From 8e24bd7c5324dd06064ca11351811f3937ed3803 Mon Sep 17 00:00:00 2001 From: Stefan-5422 <32109571+Stefan-5422@users.noreply.github.com> Date: Thu, 26 Jan 2023 16:25:58 +0100 Subject: [PATCH] Finish configuration of gathering Service --- .../host/mqtt/mqtt2prom/config.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Elektrifikatsiya/host/mqtt/mqtt2prom/config.yaml b/src/Elektrifikatsiya/host/mqtt/mqtt2prom/config.yaml index 3c2b49c..225e946 100644 --- a/src/Elektrifikatsiya/host/mqtt/mqtt2prom/config.yaml +++ b/src/Elektrifikatsiya/host/mqtt/mqtt2prom/config.yaml @@ -43,7 +43,7 @@ metrics: # The name of the metric in a MQTT JSON message mqtt_name: temperature # The prometheus help text for this metric - help: DHT22 temperature reading + help: The temperature of the Shelly sensor # The prometheus type for this metric. Valid values are: "gauge" and "counter" type: gauge # A map of string to string for constant labels. This labels will be attached to every prometheus metric @@ -54,9 +54,20 @@ metrics: mqtt_name: power # The scale of the metric in a MQTT JSON message (prom_value = mqtt_value * scale) # The prometheus help text for this metric - help: DHT22 humidity reading + help: The current power draw of the attached device # The prometheus type for this metric. Valid values are: "gauge" and "counter" type: gauge const_labels: sensor_type: shelly #A map of string to string for constant labels. This labels will be attached to every prometheus metric + - prom_name: state + mqtt_name: 0 + help: The current state the relay is in + type: gauge + const_labels: + sensor_type: shelly + string_value_mapping: + map: + off: 0 + on: 1 + error_value: 0 \ No newline at end of file