]> git.openstreetmap.org Git - chef.git/commitdiff
Configure server URL for amtool
authorTom Hughes <tom@compton.nu>
Tue, 26 Jan 2021 18:24:05 +0000 (18:24 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 26 Jan 2021 18:24:05 +0000 (18:24 +0000)
cookbooks/prometheus/recipes/server.rb
cookbooks/prometheus/templates/default/amtool.yml.erb [new file with mode: 0644]

index a5a24267d8d17627b4589988d256727bab158c3a..e4689dbf15346468154e4b3e8a2b73a51368369b 100644 (file)
@@ -224,6 +224,13 @@ service "prometheus-alertmanager" do
   subscribes :reload, "template[/etc/prometheus/alertmanager.yml]"
 end
 
+template "/etc/prometheus/amtool.yml" do
+  source "amtool.yml.erb"
+  owner "root"
+  group "root"
+  mode "644"
+end
+
 package "grafana-enterprise"
 
 template "/etc/grafana/grafana.ini" do
diff --git a/cookbooks/prometheus/templates/default/amtool.yml.erb b/cookbooks/prometheus/templates/default/amtool.yml.erb
new file mode 100644 (file)
index 0000000..2bd4656
--- /dev/null
@@ -0,0 +1,3 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+alertmanager.url: http://localhost:9093/alertmanager