Hi,
can someone please help me understand with what is the difference between using two different groups in rule.yml and using one group with list of two rules?
in which situation groups should be preferred and a list of rules in one group?
please find below for reference.
groups:
- name: Spring-boot
rules:
- alert: response_time_mtr
expr: histogram_quantile(.99, sum(rate(http_server_requests_seconds_bucket{uri="<uri>",status="200",appName="app"}[5m])) by (le,appName)) > 2
labels:
app_name: app
group: Spring-boot
annotations:
summary: '(instance {{ $labels.instance }})'
- name: grp_2
rules:
- alert: up_mtr
expr: up{job="springapp"} == 0
labels:
app_name: app
group: grp_2
annotations:
summary: "app down alert"
------------------------------------
groups:
- name: Spring-boot
rules:
- alert: response_time_mtr
expr: histogram_quantile(.99, sum(rate(http_server_requests_seconds_bucket{uri="<uri>",status="200",appName="app"}[5m])) by (le,appName)) > bool 2
labels:
app_name: app
annotations:
summary: '(instance {{ $labels.instance }})'
- alert: up_mtr
expr: up{job="springapp"} == 0
labels:
app_name: app
annotations:
summary: "app down alert"
Thanks