added zigbee2mqtt labeling

This commit is contained in:
John Lancaster
2023-11-29 19:57:14 -06:00
parent f649001ad1
commit 5b9799031e
2 changed files with 10 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ scrape_configs:
- source_labels: ['__meta_docker_container_log_stream']
target_label: 'logstream'
- target_label: 'host'
replacement: '${HOSTNAME}'
replacement: '${DOCKER_HOST}'
pipeline_stages:
- match:
selector: '{container="appdaemon"}'
@@ -31,3 +31,11 @@ scrape_configs:
level:
app:
msg:
- match:
selector: '{container="zigbee2mqtt"} |= "MQTT publish"'
stages:
- regex:
expression: "topic '(?P<topic>zigbee2mqtt\/(?P<device>[^\/]+).*?)', payload '(?P<payload>.*?)'$"
- labels:
topic:
device: