Skip to content

Commit

Permalink
Make prometheus API blocks work
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Oct 19, 2023
1 parent 0945b46 commit 7449c8b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cookbooks/prometheus/templates/default/apache.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,27 @@
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 %>
Expand Down

0 comments on commit 7449c8b

Please sign in to comment.