]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/prometheus/recipes/server.rb
Add some alert rules for prometheus
[chef.git] / cookbooks / prometheus / recipes / server.rb
index d069cd8e7b9f166c28b9f3d8deaf7e8d89167ae2..2ebf5a8230d04af5983baf5e575494760f798759 100644 (file)
@@ -184,10 +184,18 @@ template "/etc/prometheus/prometheus.yml" do
   variables :jobs => jobs
 end
 
+template "/etc/prometheus/alert_rules.yml" do
+  source "alert_rules.yml.erb"
+  owner "root"
+  group "root"
+  mode "644"
+end
+
 service "prometheus" do
   action [:enable, :start]
   subscribes :restart, "template[/etc/default/prometheus]"
   subscribes :reload, "template[/etc/prometheus/prometheus.yml]"
+  subscribes :reload, "template[/etc/prometheus/alert_rules.yml]"
 end
 
 template "/etc/default/prometheus-alertmanager" do