Not much.  The main thing is that all rules within a rule group have the 
same evaluation interval; so if you want to have a rule evaluated at a 
different interval, it must be in a different group.

On Tuesday, 11 January 2022 at 04:22:10 UTC [email protected] wrote:

> 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
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/4f4d976b-925a-47b4-abe3-23eab9f6a0f5n%40googlegroups.com.

Reply via email to