...
Code Block |
---|
rulemanager: rules: groups: - name: recording_rules rules: - record: application_availability_slo expr: sum by (kube_cluster_name, kube_service) (increase(promhttp_metric_handler_requests_total{code=~"2.*"}[28d])) / sum by (kube_cluster_name, kube_service) (increase(promhttp_metric_handler_requests_total{code=~"2.*|5.*"}[28d])) |
If you are adding multiple rules then its best to add them to a group of its own, as follows (using MyGroup
):
Code Block |
---|
rulemanager:
rules:
...
MyGroup:
- name: my_group_rules
rules:
- record: rule_name_1
expr: sum by (kube_cluster_name, kube_service) (increase(promhttp_metric_handler_requests_total{code=~"2.*"}[28d])) / sum by (kube_cluster_name, kube_service) (increase(promhttp_metric_handler_requests_total{code=~"2.*|5.*"}[28d])) |
Dashboards & Alerts
Using Kloudfuse catalog service
...