Skip to content

Commit

Permalink
Add metrics rule to forward metrics requests to prom exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
LDiazN committed Feb 20, 2025
1 parent da338b2 commit 61e9c8e
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ server {

server_name _;

location /metrics {
proxy_pass http://localhost:9113;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location / {
if ($request_method !~ ^(GET|POST|HEAD|OPTIONS|PUT|DELETE)$) {
return 405;
Expand All @@ -32,6 +39,7 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_cache_bypass $http_upgrade;
}

}

upstream wcths {
Expand Down

0 comments on commit 61e9c8e

Please sign in to comment.