Files
Jérôme LOYET d28d6cd818 make error_value global to metric
* fail if both metric.error_value and
  metric.string_value_mapping.error_value are set
* mark metric.string_value_mapping.error_value as deprecated
2024-12-30 09:53:12 +01:00
..
2024-12-30 09:53:12 +01:00
2020-11-08 22:01:36 +01:00
2020-09-18 10:52:29 -04:00
2020-11-08 22:01:36 +01:00

Hack Scenarios

Required is a MQTT client. I use this: https://github.com/shirou/mqttcli

Shelly (Metric Per Topic)

The scenario is the feature requested by issue https://github.com/hikhvar/mqtt2prometheus/issues/26.

To start the scenario run:

docker-compose --env-file shelly.env up

To publish a message run:

mqttcli pub --host localhost -p 1883 -t shellies/living-room/sensor/temperature '15'

DHT22 (Object Per Topic)

The default scenario

To start the scenario run:

docker-compose --env-file dht22.env up

To publish a message run:

mqttcli pub --host localhost -p 1883 -t v1/devices/me/test -m '{"temperature":"12", "humidity":21}'