X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/ff6e215ca12d2efe3493da1eb0152751ceef7162..21278ff447541633c438d7b133fa0a669630957c:/cookbooks/prometheus/recipes/server.rb diff --git a/cookbooks/prometheus/recipes/server.rb b/cookbooks/prometheus/recipes/server.rb index fab3f4652..cee5443a1 100644 --- a/cookbooks/prometheus/recipes/server.rb +++ b/cookbooks/prometheus/recipes/server.rb @@ -302,6 +302,10 @@ systemd_service "prometheus-alertmanager-executable" do notifies :restart, "service[prometheus-alertmanager]" end +link "/usr/local/bin/promtool" do + to "/opt/prometheus-server/prometheus/promtool" +end + template "/etc/prometheus/alertmanager.yml" do source "alertmanager.yml.erb" owner "root" @@ -315,13 +319,23 @@ service "prometheus-alertmanager" do subscribes :restart, "archive_file[#{cache_dir}/alertmanager.linux-amd64.tar.gz]" end -template "/etc/prometheus/amtool.yml" do +directory "/etc/amtool" do + owner "root" + group "root" + mode "755" +end + +template "/etc/amtool/config.yml" do source "amtool.yml.erb" owner "root" group "root" mode "644" end +link "/usr/local/bin/amtool" do + to "/opt/prometheus-server/alertmanager/amtool" +end + template "/etc/prometheus/karma.yml" do source "karma.yml.erb" owner "root"