From 09b410b27cd5eae901ae9898835038701513743f Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 21 Nov 2021 10:03:09 +0000 Subject: [PATCH] Restart prometheus services when the binaries change --- cookbooks/prometheus/recipes/server.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cookbooks/prometheus/recipes/server.rb b/cookbooks/prometheus/recipes/server.rb index 2e3ab53ad..f0c4a8821 100644 --- a/cookbooks/prometheus/recipes/server.rb +++ b/cookbooks/prometheus/recipes/server.rb @@ -301,6 +301,7 @@ service "prometheus" do action [:enable, :start] subscribes :reload, "template[/etc/prometheus/prometheus.yml]" subscribes :reload, "template[/etc/prometheus/alert_rules.yml]" + subscribes :restart, "archive_file[#{cache_dir}/prometheus.linux-amd64.tar.gz]" end systemd_service "prometheus-alertmanager-executable" do @@ -320,6 +321,7 @@ end service "prometheus-alertmanager" do action [:enable, :start] subscribes :reload, "template[/etc/prometheus/alertmanager.yml]" + subscribes :restart, "archive_file[#{cache_dir}/alertmanager.linux-amd64.tar.gz]" end template "/etc/prometheus/amtool.yml" do @@ -351,6 +353,7 @@ end service "prometheus-karma" do action [:enable, :start] subscribes :reload, "template[/etc/prometheus/karma.yml]" + subscribes :restart, "archive_file[#{cache_dir}/karma-linux-amd64.tar.gz]" end package "grafana-enterprise" -- 2.45.1