mirror of
https://github.com/hikhvar/mqtt2prometheus.git
synced 2026-05-06 16:46:54 +00:00
This commit allows to extract the metric name from the topic path. Now it can be configured if all metrics are in a object in a certain topic or if every topic contains exactly one metric. However, currently these modes can not be mixed. This should solve !26 TODO: * Update documentation * Add unit tests
30 lines
583 B
YAML
30 lines
583 B
YAML
version: "3.8"
|
|
services:
|
|
mqtt2prometheus:
|
|
build:
|
|
context: ../
|
|
dockerfile: Dockerfile
|
|
command:
|
|
- /mqtt2prometheus
|
|
- -log-level
|
|
- debug
|
|
ports:
|
|
- 9641:9641
|
|
volumes:
|
|
- type: bind
|
|
source: ./${CONFIG:-dht22.yaml}
|
|
target: /config.yaml
|
|
mosquitto:
|
|
image: eclipse-mosquitto:1.6.9
|
|
ports:
|
|
- 1883:1883
|
|
- 9001:9001
|
|
prometheus:
|
|
image: prom/prometheus:v2.18.1
|
|
ports:
|
|
- 9090:9090
|
|
volumes:
|
|
- type: bind
|
|
source: ./prometheus.yml
|
|
target: /etc/prometheus/prometheus.yml
|