From 71018df1f3d65d812dcd71729750a2f2c1aad0ac Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 11 Oct 2023 00:58:52 +0100 Subject: [PATCH] Restart cloudwatch exporter when the configuration changes --- cookbooks/prometheus/recipes/server.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/prometheus/recipes/server.rb b/cookbooks/prometheus/recipes/server.rb index 1a6639abe..902844c3d 100644 --- a/cookbooks/prometheus/recipes/server.rb +++ b/cookbooks/prometheus/recipes/server.rb @@ -58,6 +58,7 @@ prometheus_exporter "cloudwatch" do options "--config.file=/etc/prometheus/cloudwatch.yml" environment "AWS_ACCESS_KEY_ID" => "AKIASQUXHPE7JHG37EA6", "AWS_SECRET_ACCESS_KEY" => tokens["cloudwatch"] + subscribes :restart, "template[/etc/prometheus/cloudwatch.yml]" end cache_dir = Chef::Config[:file_cache_path] -- 2.39.5