From: Tom Hughes Date: Tue, 15 Sep 2020 21:16:28 +0000 (+0100) Subject: Configure SMTP for prometheus X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/4d0fc19a3491af075756c3125cad3730e28d0f48?ds=inline Configure SMTP for prometheus --- diff --git a/cookbooks/prometheus/recipes/server.rb b/cookbooks/prometheus/recipes/server.rb index 2fcaddf47..5132eabdd 100644 --- a/cookbooks/prometheus/recipes/server.rb +++ b/cookbooks/prometheus/recipes/server.rb @@ -58,6 +58,7 @@ end service "grafana-server" do action [:enable, :start] + subscribes :restart, "template[/etc/grafana/grafana.ini]" end apache_module "alias" diff --git a/cookbooks/prometheus/templates/default/grafana.ini.erb b/cookbooks/prometheus/templates/default/grafana.ini.erb index bdc143777..08f1d5dfd 100644 --- a/cookbooks/prometheus/templates/default/grafana.ini.erb +++ b/cookbooks/prometheus/templates/default/grafana.ini.erb @@ -1,8 +1,17 @@ # DO NOT EDIT - This file is being maintained by Chef +instance_name = prometheus.openstreetmap.org + [server] root_url = https://prometheus.openstreetmap.org/ [security] admin_user = admin admin_password = <%= @passwords[:grafana_admin] %> + +[smtp] +enabled = true +host = localhost:25 +skip_verify = true +from_address = admins@openstreetmap.org +from_name = Prometheus