Open ismaileneskirli opened 3 years ago
Somewhat old issue but here's my configuration:
You run the docker image by giving the hostname of your mosquitto broker. Taken from readme.md
docker run --name mosquitto-exporter \
-p 9234:9234 sapcc/mosquitto-exporter \
--endpoint tcp://mosquitto:1883
Then you need to configure prometheus.yml with correct scrape configs.
scrape_configs:
- job_name: 'mosquitto-exporter'
static_configs:
- targets: ['mosquitto-exporter:9234']
labels:
group: 'mosquitto-exporter'
metrics_path: '/metrics'
scheme: 'http'
@msrn The README should include this, thanks!
For example, with Netdata you can run it as
docker run -d --restart unless-stopped --name mosquitto-exporter-prometeus --network="if mosquitto in docker" -p 127.0.0.1:9234:9234 sapcc/mosquitto-exporter --endpoint tcp://<container name or IP>:1883 --user $user --pass $pass
Thanks for your work, i want to use your repo for my project, how do i configure this repo according to my mqtt broker ? any help is appreciated