From 6f34bd4d083266a4fa8ebc354598c7001c321ad0 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 7 Dec 2023 00:10:36 -0600 Subject: [PATCH] added contact label --- promtail/promtail-config.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/promtail/promtail-config.yml b/promtail/promtail-config.yml index 8b3efd0..b5a49e7 100644 --- a/promtail/promtail-config.yml +++ b/promtail/promtail-config.yml @@ -53,4 +53,13 @@ scrape_configs: occupancy: occupancy source: payload - labels: - occupancy: \ No newline at end of file + occupancy: + - match: + selector: '{container="zigbee2mqtt"} |= "contact"' + stages: + - json: + expressions: + contact: contact + source: payload + - labels: + contact: \ No newline at end of file