- grafana: postgres backend, provisioning (prometheus datasource + node/NUT dashboards) - prometheus: native service, scrape config via host_vars, localhost bind - node_exporter: host metrics exporter (localhost:9100)
31 lines
900 B
Django/Jinja
31 lines
900 B
Django/Jinja
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name {{ prometheus_nginx_server_name }};
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name {{ prometheus_nginx_server_name }};
|
|
|
|
ssl_certificate {{ prometheus_nginx_ssl_certificate }};
|
|
ssl_certificate_key {{ prometheus_nginx_ssl_certificate_key }};
|
|
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
ssl_prefer_server_ciphers on;
|
|
|
|
access_log /var/log/nginx/prometheus_access.log;
|
|
error_log /var/log/nginx/prometheus_error.log;
|
|
|
|
location / {
|
|
proxy_pass http://{{ prometheus_web_listen_address }};
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|