]> git.openstreetmap.org Git - chef.git/commitdiff
Make prometheus API blocks work
authorTom Hughes <tom@compton.nu>
Thu, 19 Oct 2023 20:15:27 +0000 (21:15 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 19 Oct 2023 20:15:27 +0000 (21:15 +0100)
cookbooks/prometheus/templates/default/apache.erb

index e6290caedeb789ee7296eb2face75c1b4c0e6533..c20daa31e86d650082db11c5c6e067167bda98e1 100644 (file)
        SSLCertificateFile /etc/ssl/certs/prometheus.openstreetmap.org.pem
        SSLCertificateKeyFile /etc/ssl/private/prometheus.openstreetmap.org.key
 
-       Redirect 403 /prometheus/api/v1/admin
        ProxyPass /prometheus http://localhost:9090/prometheus
-       Redirect 403 /alertmanager/api
        ProxyPass /alertmanager http://localhost:9093/alertmanager
        ProxyPass /karma http://localhost:8081/karma
        ProxyPass /api/live/ws ws://localhost:3000/api/live/ws
        ProxyPass / http://localhost:3000/
        ProxyPreserveHost on
 
+       <Location /prometheus/api/v1/admin>
+               Require all denied
+       </Location>
+
        <Location /alertmanager>
 <% @admin_hosts.each do |host| -%>
                Require ip <%= host %>
 <% end -%>
        </Location>
 
+       <Location /alertmanager/api>
+               Require all denied
+       </Location>
+
        <Location /karma>
 <% @admin_hosts.each do |host| -%>
                Require ip <%= host %>