Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Conditions based on previous alert contents?


I am not sure if this is possible, but am trying to figure out if it is - appreciate any insight. 

We have a system that delivers 'up' and 'down' alerts for BGP link status. This is a libreNMS delivering to Opsgenie from incoming SNMP traps.  We want opsgenie to alert us when a 'Down' alert is recieved, and an 'Up' alert so we know when peers recover on their own. 

However, sometimes our routers issue fake 'up' alerts. We want to ignore these. 

The logic I am trying to recreate goes something like this: 

"If alert contains text 'BGP Up', then only notify if 'AS#####' (The AS number contained in the body of the alert) matches an AS##### in a previous alert recieved within the last, say 24 hours". 

I've been reading through policies section, action filters and 'services' which still confuse me to see if anything like this is possible, and I'm starting to think it's not. 

Looking for the communities opinion - is there any way to corellate an alert to the textual content of a previous alert and make that a condition of the alert triggering in this way?

Our option B is to just 'ignore' 'Up' alerts from the two older routers that seem to be issuing the fake up alerts. 

1 answer

1 vote
Connor Eyles Atlassian Team Sep 05, 2021

Hey Paul!

I'm Connor from the Opsgenie support team here at Atlassian 😊

If I understand this correctly and please correct me if I am wrong here, The logic you are wanting to do here is "If alert contains text 'BGP Up', then only notify if 'AS#####' (The AS number contained in the body of the alert) matches an AS##### in a previous alert received within the last, say 24 hours".

  • Now is the timeframe important here for your logic?
  • A real UP message will contain a matching AS##### and an existing alert is open with the same AS##### correct? 
  • A fake UP message will send a UP message containing AS##### with no existing open down alert? 

So if this is the case what you can do is configure your integration so that the create action ignores UP messages and the UP messages can match the close action here. The logic here is when your system sends a UP message and there is an existing open alert that matches the AS##### it will automatically close the alert but if there is no existing open alert it will ignore that alert. You can set notifications when an alert is automatically closed, if you don't want the alert to close to set the UP messages to match the add note action instead. 

To achieve this you can do the following:

  • Edit the integration so that the create action ignores UP messages, configure the filter with your desired conditions.
  • Ensure that the alias is configured so that the UP messages and down messages match with each other. The Alias field is a user-defined unique identifier for "open" alerts so for example if an open alert is AS##### and a UP alert comes in with the same alias the close action will match against this.
  • Have the conditions set on the close action so that the UP messages match this action.

Now if you wanted to pull out AS##### from your payload you can use our string processing methods or regex to do this:

For option 2 if you wanted to simply ignore the UP messages then all you need to do is configure the filters on the create action like this - 
Image 2021-09-06 at 9.31.05 am



Hi Conner -- you have interpreted my request correctly, and this sounds like it will probably work. I will give it a try and report back in a few days.


Connor Eyles Atlassian Team Sep 07, 2021

Glad to hear it Paul 😊

Let me know how you go!



Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

164 views 1 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you