]> git.openstreetmap.org Git - chef.git/commitdiff
Configure SMTP for prometheus
authorTom Hughes <tom@compton.nu>
Tue, 15 Sep 2020 21:16:28 +0000 (22:16 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 15 Sep 2020 21:21:26 +0000 (22:21 +0100)
cookbooks/prometheus/recipes/server.rb
cookbooks/prometheus/templates/default/grafana.ini.erb

index 2fcaddf475ed56005da50340578baef0a5a7f439..5132eabdddcf3a6450e133ab7644dd4b119808c1 100644 (file)
@@ -58,6 +58,7 @@ end
 
 service "grafana-server" do
   action [:enable, :start]
+  subscribes :restart, "template[/etc/grafana/grafana.ini]"
 end
 
 apache_module "alias"
index bdc1437778106b93724ed2daaa8e56f51ba04a7e..08f1d5dfd2f4d4e989e8da2e247697643819cf8d 100644 (file)
@@ -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