end
end
+template "/etc/default/prometheus" do
+ source "default.prometheus.erb"
+ owner "root"
+ group "root"
+ mode "644"
+end
+
template "/etc/prometheus/prometheus.yml" do
source "prometheus.yml.erb"
owner "root"
service "prometheus" do
action [:enable, :start]
+ subscribes :restart, "template[/etc/default/prometheus]"
subscribes :reload, "template[/etc/prometheus/prometheus.yml]"
end
+template "/etc/default/prometheus-alertmanager" do
+ source "default.alertmanager.erb"
+ owner "root"
+ group "root"
+ mode "644"
+end
+
template "/etc/prometheus/alertmanager.yml" do
source "alertmanager.yml.erb"
owner "root"
service "prometheus-alertmanager" do
action [:enable, :start]
+ subscribes :restart, "template[/etc/default/prometheus-alertmanager]"
subscribes :reload, "template[/etc/prometheus/alertmanager.yml]"
end
SSLCertificateFile /etc/ssl/certs/prometheus.openstreetmap.org.pem
SSLCertificateKeyFile /etc/ssl/private/prometheus.openstreetmap.org.key
+ ProxyPass /prometheus http://localhost:9090/prometheus
+ Redirect 403 /alertmanager/api
+ ProxyPass /alertmanager http://localhost:9093/alertmanager
ProxyPass / http://localhost:3000/
ProxyPreserveHost on
</VirtualHost>