Hi Ian
yes i know this tool but it didn't notice anything wrong in my syntax

Le jeudi 22 juillet 2021 à 11:54:49 UTC+2, [email protected] a écrit :

> Hey Fredeic,
>
> When folks raise questions about unexpected routing in their alertmanager 
> routing trees, I always recommend that you try amtool 
> <https://github.com/prometheus/alertmanager/tree/main/cmd/amtool>, 
> specifically the amtool config routes test 
> <https://manpages.debian.org/testing/prometheus-alertmanager/amtool.1.en.html#config_routes_test_%5B%3Cflags%3E%5D_%5B%3Clabels%3E...%5D>
>  
> command.
>
> Best,
>
> Ian
>
> On Wed, Jul 21, 2021 at 5:53 PM Brian Candler <[email protected]> wrote:
>
>>   - 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/acdbfca0-00b2-4232-8cae-5f6fc98b2fbdn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/prometheus-users/acdbfca0-00b2-4232-8cae-5f6fc98b2fbdn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/5f9c01a9-4606-494d-91b5-56d11fbcb90an%40googlegroups.com.

Reply via email to