Files
mtusi2026lab7/infra/telemetry-gateway/prometheus.cfg
T
Vladislav Kunetskiy 1b6e96ccc0
Application / Go invariants and static checks (pull_request) Canceled after 0s
Application / Lab7 verified TLS and retained features (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
lab7: безопасность, mTLS, OpenBao и PKI lifecycle
2026-11-10 14:39:57 +03:00

47 lines
2.0 KiB
INI

# HAProxy 3.2; Prometheus must listen only on 127.0.0.1:19090.
global
log stdout format raw local0
maxconn 512
hard-stop-after 30s
tune.ssl.cachesize 0
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
defaults
mode http
log global
log-format "%ST %Tt %b"
option dontlognull
option http-server-close
timeout connect 2s
timeout client 30s
timeout server 30s
timeout http-request 5s
timeout http-keep-alive 2s
frontend prometheus_https
bind :9090 ssl crt /run/identity/current/tls.pem ca-file /run/identity/current/ca.crt crl-file /run/identity/current/ca.crl verify required
acl grafana ssl_c_s_dn(CN) -m str grafana
acl prometheus ssl_c_s_dn(CN) -m str prometheus
acl operator ssl_c_s_dn(CN) -m str operator
acl read_method method GET
acl query_method method GET POST
acl query_path path -m str /api/v1/query /api/v1/query_range /api/v1/labels /api/v1/series /api/v1/metadata
acl label_values path -m reg ^/api/v1/label/[A-Za-z_][A-Za-z0-9_]*/values$
acl buildinfo_path path -m str /api/v1/status/buildinfo
acl health_path path -m str /metrics /-/healthy /-/ready
acl status_path path -m str /api/v1/status/buildinfo /api/v1/status/runtimeinfo /api/v1/status/flags /api/v1/status/config /api/v1/status/tsdb /api/v1/targets /api/v1/rules /api/v1/alerts
http-request allow if grafana query_method query_path
http-request allow if grafana read_method label_values
http-request allow if grafana read_method buildinfo_path
http-request allow if prometheus read_method health_path
http-request allow if operator query_method query_path
http-request allow if operator read_method label_values
http-request allow if operator read_method health_path
http-request allow if operator read_method status_path
# No role gets reload, quit, admin, federation, remote-write or OTLP writes.
http-request deny deny_status 403
default_backend prometheus_private
backend prometheus_private
server local 127.0.0.1:19090