Thanks Brian it works. Need to adjust my routes also. 

On Monday, November 15, 2021 at 1:31:00 AM UTC+5:30 Brian Candler wrote:

> Selecting *which* alerts get sent to team-ops-genie is in the part of the 
> config which you haven't shown - the "routes" section.  You can filter 
> alerts which match particular criteria, such as particular values or 
> patterns of labels.
>
> As for the 422 result, maybe it's to do with the loop in priority.  If 
> there are two alerts in the group it might expand to "P1P1" or "P1P3" for 
> example.
>
> You'll have to decide how to deal with this.  One option is to look at 
> only .Alerts[0], assuming that all alerts in the group have the same 
> severity.  But I think it's cleaner to make separate receivers:
>
> - name: 'team-ops-genie-critical'
>   opsgenie_configs:
>   - send_resolved: true
>     teams: Operations
>     priority: P1
> - name: 'team-ops-genie-warning'
>   opsgenie_configs:
>   - send_resolved: true
>     teams: Operations
>     priority: P3
>
> and use your routing rules to deliver alerts to the appropriate receiver.  
> (I have left out your 'tags' expression because I don't think that will 
> work well as written when there are multiple alerts in the group)
>

-- 
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/fbbd836c-bb50-4fd3-8296-990d65569376n%40googlegroups.com.

Reply via email to