]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/prometheus/recipes/server.rb
Restart cloudwatch exporter when the configuration changes
[chef.git] / cookbooks / prometheus / recipes / server.rb
index 1a6639abea6d5a7ee995368f39d3318642ad4951..902844c3d8826dd57976e9e78305fa797fb22fec 100644 (file)
@@ -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]