From: Tom Hughes Date: Tue, 10 Oct 2023 23:58:52 +0000 (+0100) Subject: Restart cloudwatch exporter when the configuration changes X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/71018df1f3d65d812dcd71729750a2f2c1aad0ac Restart cloudwatch exporter when the configuration changes --- 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]