Cleanup haproxy rules

* Move haproxy recording rules into haproxy rule group.
* Move remaining 'recording.yml' into rule group for generic process
metrics.
parent c991eca9
groups:
- name: recording.rules
rules:
- record: backend_code:haproxy_server_http_responses_total:irate1m
expr: sum(irate(haproxy_server_http_responses_total[1m])) WITHOUT (fqdn, instance)
- record: job_frontend:haproxy_frontend_bytes_in_total:irate1m
expr: sum(irate(haproxy_frontend_bytes_in_total[1m])) WITHOUT (fqdn, instance)
- record: job_frontend:haproxy_frontend_request_errors_total:irate1m
expr: sum(irate(haproxy_frontend_request_errors_total[1m])) WITHOUT (fqdn, instance)
- record: job_backend:haproxy_backend_response_errors_total:irate1m
expr: sum(irate(haproxy_backend_response_errors_total[1m])) WITHOUT (fqdn, instance)
- record: process_cpu_seconds_total:rate1m
expr: rate(process_cpu_seconds_total[1m])
groups:
- name: Generic process
rules:
- record: process_cpu_seconds_total:rate1m
expr: rate(process_cpu_seconds_total[1m])
groups:
- name: haproxy.rules
rules:
- record: backend_code:haproxy_server_http_responses_total:irate1m
expr: >
sum without (fqdn, instance) (
irate(haproxy_server_http_responses_total[1m])
)
- record: frontend_code:haproxy_frontend_http_responses_total:irate1m
expr: >
sum without (fqdn, instance) (
irate(haproxy_frontend_http_responses_total[1m])
)
- record: job_frontend:haproxy_frontend_bytes_in_total:irate1m
expr: >
sum without (fqdn, instance) (
irate(haproxy_frontend_bytes_in_total[1m])
)
- record: job_frontend:haproxy_frontend_bytes_out_total:irate1m
expr: >
sum without (fqdn, instance) (
irate(haproxy_frontend_bytes_out_total[1m])
)
- record: job_backend:haproxy_backend_response_errors_total:irate1m
expr: >
sum without (fqdn, instance) (
irate(haproxy_backend_response_errors_total[1m])
)
- record: job_frontend:haproxy_frontend_request_errors_total:irate1m
expr: >
sum without (fqdn, instance) (
irate(haproxy_frontend_request_errors_total[1m])
)
- alert: HighWebErrorRate
expr: sum(backend_code:haproxy_server_http_responses_total:irate1m{backend="web",code="5xx",tier="lb"})
- sum(backend_code:haproxy_server_http_responses_total:irate1m{backend="web",code!="5xx",tier="lb"})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment