environment "FASTLY_API_TOKEN" => tokens["fastly"]
end
-package "prometheus"
+package %w[
+ prometheus
+ prometheus-alertmanager
+]
promscale_version = "0.1.4"
subscribes :reload, "template[/etc/prometheus/prometheus.yml]"
end
+template "/etc/prometheus/alertmanager.yml" do
+ source "alertmanager.yml.erb"
+ owner "root"
+ group "root"
+ mode "644"
+end
+
+service "prometheus-alertmanager" do
+ action [:enable, :start]
+ subscribes :reload, "template[/etc/prometheus/alertmanager.yml]"
+end
+
package "grafana-enterprise"
template "/etc/grafana/grafana.ini" do
--- /dev/null
+# DO NOT EDIT - This file is being maintained by Chef
+
+global:
+ smtp_smarthost: localhost:25
+ smtp_from: prometheus@openstreetmap.org
+
+templates:
+ - /etc/prometheus/alertmanager_templates/*.tmpl
+
+route:
+ group_by:
+ - service
+ group_wait: 30s
+ group_interval: 5m
+ repeat_interval: 3h
+ receiver: admins-email
+
+inhibit_rules:
+
+receivers:
+ - name: admins-email
+ email_configs:
+ - to: admins@openstreetmap.org
"rails" => "root",
"trac" => "root",
"munin" => "root",
+ "prometheus" => "root",
"www-data" => "root",
"osmbackup" => "root",
"noreply" => "/dev/null",
--- /dev/null
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("prometheus-alertmanager") do
+ it { should be_installed }
+end
+
+describe service("prometheus-alertmanager") do
+ it { should be_enabled }
+ it { should be_running }
+end
+
+describe port(9093) do
+ it { should be_listening.with("tcp6") }
+end