https://github.com/limitium/mqtt2prom
https://github.com/limitium/mqtt2prom
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/limitium/mqtt2prom
- Owner: limitium
- License: mit
- Created: 2020-10-25T21:49:12.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-27T15:50:05.000Z (over 5 years ago)
- Last Synced: 2025-02-28T18:23:41.622Z (over 1 year ago)
- Language: Python
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Prometheus exporter for MQTT

## Description:
Converts MQTT data from `${topic}/userName/zoneName/sensorName/parameterType value` to prometheus Gauges
`zoneName_sensorName_parameterType{u="userName"} value`
## Usage:
- Create a folder to hold the config (default: "conf/")
- Add config in yaml format to the folder. (See exampleconf/conf.yaml for details)
- Run ./mqtt_exporter.py or Docker `docker run -v /Users/limi/projects/mqtt_exporter/conf:/usr/src/app/conf mqtt2prom`
- Profit!
## Config:
Yaml files in the folder config/ is combined and read as config.
See exampleconf/ for examples.
## Python dependencies:
- paho-mqtt
- prometheus-client
- PyYAML
- yamlreader
## Todo:
- Add persistence of metrics on restart
- Add TTL for metrics