From 6d6deb249e37d4eb3ec7d9b6f51d33009f5778d0 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 26 Jan 2021 18:24:05 +0000 Subject: [PATCH] Configure server URL for amtool --- cookbooks/prometheus/recipes/server.rb | 7 +++++++ cookbooks/prometheus/templates/default/amtool.yml.erb | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 cookbooks/prometheus/templates/default/amtool.yml.erb diff --git a/cookbooks/prometheus/recipes/server.rb b/cookbooks/prometheus/recipes/server.rb index a5a24267d..e4689dbf1 100644 --- a/cookbooks/prometheus/recipes/server.rb +++ b/cookbooks/prometheus/recipes/server.rb @@ -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 index 000000000..2bd465661 --- /dev/null +++ b/cookbooks/prometheus/templates/default/amtool.yml.erb @@ -0,0 +1,3 @@ +# DO NOT EDIT - This file is being maintained by Chef + +alertmanager.url: http://localhost:9093/alertmanager -- 2.39.5