Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Help with regular expression

Marcel Maas March 9, 2022

I want to trigger with a regular expression that if the percent is below 10% the alarm will be triggert who can help ? with how it looks like

Current Incoming ASR 10%

 

 

1 answer

2 votes
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 9, 2022

Hi @Marcel Maas ,

I was able to get this use case working through a notification policy, and a regex expression like:

.*(\d{2,}).*

reg1.jpg

 

The notification policy above would delay/suppress alerts that contain anything in the message field with numbers greater than 2 digits. Here are a few tests I ran as well:

reg2.jpgreg3.jpg

 

The first test, #2042, suppressed notifications for 10%. The second test, #2046, notified the on-call user for 5%.

 

Notification policies are only available on the Standard and Enterprise plans. So if your subscription does not provide this functionality, I suppose you could use a routing rule that sends these alerts to No-one:

reg4.jpgreg5.jpg

Marcel Maas March 9, 2022

Thats already a step but there are more alarm coming in any it should only get a trigger when the alarm text is Current Incoming ASR 10% with a percentage behind it what should trigger the regex. So in your example on any message received the regex will be checked ?

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 10, 2022

Yes - any message received will review the policy and check the filter's regex - but the policy will suppress notifications on alerts that contain <=10% in the message.

Marcel Maas March 10, 2022

I receive serveral messages to my team channel and expect more rules so it should only trigger when the message start with Current Incoming ASR <=10%

The could also be a message e.q.  Current Outgoing ASR 9% and the regex should not trigger on that one and go to the escalation schedule

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 10, 2022

You can add multiple conditions to the filter to meet your use case. The regex shared above is only filtering on the numerical value. You can add another condition to filter on "Current Incoming," "Current Outgoing," etc. - again - whatever your use case is:

reg6.jpg

Marcel Maas March 11, 2022

Still not working if it is 99% or 2% still always a alert is coming out when this mail is receiveed with

Current Incoming ASR 99%

Current Incoming ASR 1%

Looks like setting are the same as your screen shot

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events