From 2432075f9a74386cfb92c80d8f40905d2b87e5d4 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 24 Apr 2021 10:05:52 +0200 Subject: [PATCH] bundles/telegraf: ensure telegraf is running, restart on config changes --- bundles/telegraf/items.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bundles/telegraf/items.py b/bundles/telegraf/items.py index a287fc4..5cb8388 100644 --- a/bundles/telegraf/items.py +++ b/bundles/telegraf/items.py @@ -69,5 +69,17 @@ files = { 'context': { 'config': telegraf_config, }, + 'triggers': { + 'svc_systemd:telegraf:restart', + }, + }, +} + +svc_systemd = { + 'telegraf': { + 'needs': { + 'file:/etc/telegraf/telegraf.conf', + 'pkg_apt:telegraf', + }, }, }