cloudflare/pint
Publicmirrored from https://github.com/cloudflare/pintAvailable
docs/examples/prometheus_tls.hcl
28lines · modecode
| 1 | # Example Prometheus configuration with TLS and failover. |
| 2 | # Use this when Prometheus requires client certificates or uses a custom CA. |
| 3 | |
| 4 | prometheus "prod" { |
| 5 | uri = "https://prometheus-prod.example.com" |
| 6 | failover = ["https://prometheus-prod-backup.example.com"] |
| 7 | |
| 8 | # Custom headers sent with every API request. |
| 9 | headers = { |
| 10 | "X-Auth" = "${ENV_PROMETHEUS_AUTH_TOKEN}" |
| 11 | } |
| 12 | |
| 13 | # Optional TLS configuration for mTLS connections. |
| 14 | tls { |
| 15 | # SNI value for the TLS handshake. |
| 16 | serverName = "prometheus.example.com" |
| 17 | |
| 18 | # CA certificate to verify the server certificate. |
| 19 | caCert = "/etc/pint/certs/ca.pem" |
| 20 | |
| 21 | # Client certificate and key for mutual TLS. |
| 22 | clientCert = "/etc/pint/certs/client.pem" |
| 23 | clientKey = "/etc/pint/certs/client.key" |
| 24 | } |
| 25 | |
| 26 | # Only use this Prometheus for rules under rules/prod/. |
| 27 | include = ["rules/prod/.+"] |
| 28 | } |
| 29 | |