Adjust formatting in prometheus_for_dev

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2021-04-19 11:47:43 +02:00
parent ae5023405c
commit 1727112869

View file

@ -92,21 +92,21 @@ For example:
:: ::
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule kind: PrometheusRule
metadata: metadata:
labels: labels:
monitoring-key: cpe monitoring-key: cpe
name: prometheus-application-monitoring-rules name: prometheus-application-monitoring-rules
spec: spec:
groups: groups:
- name: general.rules - name: general.rules
rules: rules:
- alert: AlertBodhi500Status - alert: AlertBodhi500Status
annotations: annotations:
summary: Alerting on too many server errors summary: Alerting on too many server errors
expr: (100*sum(rate(pyramid_request_count{namespace="bodhi", path_info_pattern=~".*[^healthz]", status="500"}[20m]))/sum(rate(pyramid_request_count{namespace="bodhi", path_info_pattern=~".*[^healthz]"}[20m])))>1 expr: (100*sum(rate(pyramid_request_count{namespace="bodhi", path_info_pattern=~".*[^healthz]", status="500"}[20m]))/sum(rate(pyramid_request_count{namespace="bodhi", path_info_pattern=~".*[^healthz]"}[20m])))>1
labels: labels:
severity: high severity: high
would alert if there is more than 1% responses with 500 status code. would alert if there is more than 1% responses with 500 status code.