Big thanks ! It works 👍 Le mercredi 21 juillet 2021 à 18:53:24 UTC+2, Brian Candler a écrit :
> - match_re: > alertname: WEBLOGIC-wls_threadpool_hogging_thread_count > instance: (ljade)* > > That regular expession matches only: > > "" > "ljade" > "ljadeljade" > "ljadeljadeljade" ... etc > > - match_re: > alertname: LINUX-node_filesystem_nfs_used_percent > instance: ljade* > > That regular expression matches only: > > "ljad" > "ljade" > "ljadee" > "ljadeee" ... etc > > To match any string beginning ljade, you need: > > instance: 'ljade.*' > > (The quotes may not always be necessary but are a good idea, since YAML > can do some odd things with special symbols in certain situations, > particularly colons and asterisks) > > On Wednesday, 21 July 2021 at 13:20:38 UTC+1 [email protected] wrote: > >> Hello all ! >> >> I am using prometheus and alert manager for more than one year now and >> totally appreciated it. >> I'm trying to override default alert email by creating specific routes >> like this : >> >> route: >> group_by: ['alertname'] >> group_wait: 10s >> group_interval: 10s >> repeat_interval: 1h >> receiver: 'email' >> routes: >> - match_re: >> alertname: WEBLOGIC-wls_threadpool_hogging_thread_count >> instance: (ljade)* >> receiver: mailJADE >> - match_re: >> alertname: LINUX-node_filesystem_nfs_used_percent >> instance: ljade* >> receiver: mailJADE >> >> receivers: >> - name: 'email' >> email_configs: >> - to: mymail >> - name: 'mailJADE' >> email_configs: >> - to: 'mymail, othersemail' >> inhibit_rules: >> - source_match: >> severity: 'critical' >> target_match: >> severity: 'warning' >> equal: ['alertname', 'dev', 'instance'] >> >> The alerts arrive only on the main mail 'email' and never on 'mailJADE' >> while alerts with an instance name beginning with ljade are generated >> I tried different syntax with parenthesis and also old version match >> deprecated without success. >> >> Thanks in advance for your help >> >> Regards >> Frederic >> > -- 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/7cd1512a-8f85-4c20-9ed4-22da8d06afban%40googlegroups.com.

