1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
name: prometheus-mongodb-exporter
version: 20171129
summary: Prometheus mongodb Exporter
description: |
Exporter that exposes information gathered from mongodb for use by the Prometheus monitoring system
confinement: strict
grade: stable
apps:
mongodb-exporter:
command: 'bin/prometheus-mongodb-exporter.wrapper'
plugs: [network-bind, network]
daemon: simple
parts:
mongodb-exporter:
plugin: go
source: https://github.com/dcu/mongodb_exporter.git
go-importpath: github.com/dcu/mongodb_exporter
build: |
sudo add-apt-repository -y ppa:masterminds/glide && sudo apt-get update
sudo apt-get install -y glide
export GOPATH=$(pwd)/../go
cd $GOPATH/src/github.com/dcu/mongodb_exporter
make build
install: |
mkdir $SNAPCRAFT_PART_INSTALL/bin
cp -p ../go/src/github.com/dcu/mongodb_exporter/mongodb_exporter $SNAPCRAFT_PART_INSTALL/bin/prometheus-mongodb-exporter
snap-wrappers:
plugin: dump
source: .
organize:
snap_config_wrapper: bin/prometheus-mongodb-exporter.wrapper
daemon_arguments: etc/prometheus-mongodb-exporter/daemon_arguments.example
stage:
- bin/prometheus-mongodb-exporter.wrapper
- etc/prometheus-mongodb-exporter/daemon_arguments.example
prime:
- bin/prometheus-mongodb-exporter.wrapper
- etc/prometheus-mongodb-exporter/daemon_arguments.example
|