X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/f44b493d7b4159e13d37e3856ab7f73133fd5669..21278ff447541633c438d7b133fa0a669630957c:/cookbooks/prometheus/recipes/server.rb diff --git a/cookbooks/prometheus/recipes/server.rb b/cookbooks/prometheus/recipes/server.rb index 94e33c033..cee5443a1 100644 --- a/cookbooks/prometheus/recipes/server.rb +++ b/cookbooks/prometheus/recipes/server.rb @@ -18,7 +18,8 @@ # include_recipe "apache" -include_recipe "apt" +include_recipe "apt::grafana" +include_recipe "apt::timescaledb" include_recipe "networking" include_recipe "timescaledb" @@ -301,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" @@ -314,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"