File: snapcraft.yaml

package info (click to toggle)
prometheus-mongodb-exporter 1.0.0%2Bgit20180522.e755a44-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 760 kB
  • sloc: sh: 83; makefile: 33
file content (38 lines) | stat: -rw-r--r-- 1,408 bytes parent folder | download | duplicates (3)
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