From cf017d3cfcfb0916a489ed83471f833494ef3f78 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Wed, 13 Mar 2024 14:48:11 +0000 Subject: [PATCH] Add munin web redirects to prometheus --- cookbooks/prometheus/recipes/server.rb | 2 +- .../prometheus/templates/default/apache.erb | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/cookbooks/prometheus/recipes/server.rb b/cookbooks/prometheus/recipes/server.rb index 45b60f946..4b9058c8e 100644 --- a/cookbooks/prometheus/recipes/server.rb +++ b/cookbooks/prometheus/recipes/server.rb @@ -363,7 +363,7 @@ apache_module "proxy_http" apache_module "proxy_wstunnel" ssl_certificate "prometheus.openstreetmap.org" do - domains ["prometheus.openstreetmap.org", "prometheus.osm.org"] + domains ["prometheus.openstreetmap.org", "prometheus.osm.org", "munin.openstreetmap.org", "munin.osm.org"] notifies :reload, "service[apache2]" end diff --git a/cookbooks/prometheus/templates/default/apache.erb b/cookbooks/prometheus/templates/default/apache.erb index af0053140..f03cf1049 100644 --- a/cookbooks/prometheus/templates/default/apache.erb +++ b/cookbooks/prometheus/templates/default/apache.erb @@ -46,3 +46,30 @@ <% end -%> + + + ServerName munin.openstreetmap.org + ServerAlias munin.osm.org + ServerAdmin webmaster@openstreetmap.org + + CustomLog /var/log/apache2/munin.openstreetmap.org-access.log combined_extended + ErrorLog /var/log/apache2/munin.openstreetmap.org-error.log + + RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/ + Redirect permanent / https://prometheus.openstreetmap.org/ + + + + ServerName munin.openstreetmap.org + ServerAlias munin.osm.org + ServerAdmin webmaster@openstreetmap.org + + CustomLog /var/log/apache2/munin.openstreetmap.org-access.log combined_extended + ErrorLog /var/log/apache2/munin.openstreetmap.org-error.log + + SSLEngine on + SSLCertificateFile /etc/ssl/certs/prometheus.openstreetmap.org.pem + SSLCertificateKeyFile /etc/ssl/private/prometheus.openstreetmap.org.key + + Redirect permanent / https://prometheus.openstreetmap.org/ + -- 2.39.5