Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do i configure mosquitto-exporter ? #35

Open
ismaileneskirli opened this issue May 5, 2021 · 3 comments
Open

how do i configure mosquitto-exporter ? #35

ismaileneskirli opened this issue May 5, 2021 · 3 comments

Comments

@ismaileneskirli
Copy link

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

@msrn
Copy link

msrn commented Jun 23, 2022

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'

@Strykar
Copy link

Strykar commented Dec 14, 2022

@msrn The README should include this, thanks!

@ww7
Copy link

ww7 commented Jan 5, 2024

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 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants