node_exporter_nginx.j2 448 B

123456789101112131415
  1. location /metrics {
  2. if ($http_authorization != 'Bearer {{ node_exporter_authorization_token }}') {
  3. return 403;
  4. }
  5. proxy_http_version 1.1;
  6. proxy_set_header Host $host;
  7. proxy_set_header X-Real-IP $remote_addr;
  8. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  9. proxy_set_header X-Forwarded-Proto $scheme;
  10. proxy_pass http://localhost:9100;
  11. proxy_redirect off;
  12. }