Send MQTT data to Prometheus.
Based on https://github.com/slayer/mqtt_blackbox_exporter
$ mkdir -p ${GOPATH}/src/github.com/slayer/
$ git clone https://github.com/slayer/promqtt.git ${GOPATH}/src/github.com/slayer/promqtt/
$ cd ${GOPATH}/src/github.com/slayer/promqtt/
$ make
This will build the promqtt for all target platforms and write them to the build/
directory.
TODO: upload binaries Binaries are provided on Github, see https://github.com/slayer/promqtt.
Place the binary somewhere in a PATH
directory and make it executable (chmod +x promqtt
).
See config.yaml.dist
for a configuration example.
Native:
$ ./promqtt -config.file config.yaml
Using Docker:
docker run --rm -it -p 9214:9214 -v ${PWD}/:/data/ slayer/promqtt:latest -config.file /data/config.yaml
$ curl -s http://127.0.0.1:9214/metrics
# TODO: paste output