-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle json payload in metric_per_topic mode
- Loading branch information
Showing
4 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
mqtt: | ||
server: tcp://mosquitto:1883 | ||
topic_path: shellies/+/sensor/+ | ||
device_id_regex: "shellies/(?P<deviceid>.*)/sensor" | ||
metric_per_topic_config: | ||
metric_name_regex: "shellies/(?P<deviceid>.*)/sensor/(?P<metricname>.*)" | ||
qos: 0 | ||
cache: | ||
timeout: 24h | ||
metrics: | ||
- prom_name: temperature | ||
# The name of the metric in a MQTT JSON message | ||
mqtt_name: status/temperature:0 | ||
# The field to extract in JSON payload | ||
PayloadField: rh | ||
# The prometheus help text for this metric | ||
help: shelly temperature reading | ||
# 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 | ||
const_labels: | ||
sensor_type: shellyplusht |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters