You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.6 KiB
58 lines
1.6 KiB
2 years ago
|
|
||
|
# Logging
|
||
|
logging:
|
||
|
# logfile: 'conf/mqttexperter.log' # Optional default '' (stdout)
|
||
|
level: 'debug' # Optional default 'info'
|
||
|
|
||
|
timescale: 0
|
||
|
|
||
|
# Metric definitions
|
||
|
metrics:
|
||
|
- name: "fhem_light_state"
|
||
|
help: "Light state on/off"
|
||
|
type: "enum"
|
||
|
topic: "fhem/+/+/light"
|
||
|
parameters:
|
||
|
states:
|
||
|
- 'on'
|
||
|
- 'off'
|
||
|
label_configs:
|
||
|
- source_labels: ['__value__']
|
||
|
regex: "(ON|0)"
|
||
|
target_label: '__value__'
|
||
|
replacement: 'on'
|
||
|
action: "replace"
|
||
|
- source_labels: ['__value__']
|
||
|
regex: "(OFF|1)"
|
||
|
target_label: '__value__'
|
||
|
replacement: 'off'
|
||
|
action: "replace"
|
||
|
- source_labels: ['__msg_topic__']
|
||
|
target_label: '__topic__'
|
||
|
- source_labels: ["__msg_topic__"]
|
||
|
regex: "fhem/([^/]+).*"
|
||
|
target_label: "location"
|
||
|
replacement: '\1'
|
||
|
action: "replace"
|
||
|
- name: 'network_ping_ms'
|
||
|
help: 'ping response in ms'
|
||
|
type: 'histogram'
|
||
|
topic: 'network/+/+/ping'
|
||
|
parameters:
|
||
|
buckets:
|
||
|
- 0.5
|
||
|
- 5
|
||
|
- 10
|
||
|
label_configs:
|
||
|
- source_labels: ['__msg_topic__']
|
||
|
target_label: '__topic__'
|
||
|
- source_labels: ["__msg_topic__"]
|
||
|
regex: "network/([^/]+).*"
|
||
|
target_label: "network"
|
||
|
replacement: '\1'
|
||
|
action: "replace"
|
||
|
- source_labels: ["__msg_topic__"]
|
||
|
regex: "network/[^/]+/([^/]+).*"
|
||
|
target_label: "server"
|
||
|
replacement: '\1'
|
||
|
action: "replace"
|