Thankyou so much Brian for the details response...Its now clear to me :)
I was only testing using routing tree editor.and found it didnt work
https://prometheus.io/webtools/alerting/routing-tree-editor/ 

On Wednesday, April 29, 2020 at 12:57:12 AM UTC-7, Brian Candler wrote:
>
> You can make a nested tree of routes, which in effect gives you an "if ... 
> then ... else ..." capability.
>
>   routes:
>     - ... something to do always
>       continue: true
>     - match:
>         severity: critical
>       routes:
>         - ... things to do when critical
>         - ...
>     - ... things to do when not critical
>     - ...
>
> Leaving out the "match" condition entirely makes a rule match always.
>
> Note that "continue: true" carries on to the next rule after a match, but 
> only at the same level.  It will only fall out to the parent ruleset if no 
> matches occur.
>
> Or of course, you can explicitly match all non-critical severities e.g. 
> match_re: 
> severity: 'debug|informational|warning'
>
> As to why what you wrote before didn't work:
>
> 1. The supported regex syntax for go's re2 library is defined here:
> https://github.com/google/re2/wiki/Syntax
>
> The (?!...) form is not implemented, due to the non-backtracking design of 
> re2.
>
> 2. I don't know why you thought "not_match_re" would work, but it's not 
> defined here:
> https://prometheus.io/docs/alerting/configuration/
>
> I would have hoped that alertmanager would fail to start when given 
> unknown config tag.  If it didn't, then that could be a bug.
>

-- 
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/5d2a19f1-56d3-4838-be5c-2f5a0a5a12bc%40googlegroups.com.

Reply via email to