What I am trying to do is create an opsgenie alert for backups.
The workflow I have in mind is if a success email comes in, opsgenie ignores.
If a failed job email comes in, open a ticket. This will have the backup job name on it.
When the job succeeds, the success email will come in and close the alert in opsgenie.
The issue im having is how do I make the success email job work with the failed job?
The success email needs to match the job name of the failed job. How would I go about matching the two in order for OpsGenie to know to close the alert?
I have set up the ignore for [Success] as jobs will run and complete successfully. I need the success emails to come in to let OpsGenie know to close the alert once the failed job with the same job name comes in.
I have the create alert here. The alert subject will be [failed] %BackupJob% has x failed items. Thats no problem. Might show up as [failed] Infrastructure has 3 failed items
Now wondering how would I make the close ticket recognise the backup job name with [success] in the subject to know that the job has completed successfully and close the ticket.
Hi @Alojz Cuk ,
You're somewhat on the right track here, but missing a few parts.
It's important to note that all of the integration's actions are evaluated from top >> bottom; so the Ignore action(s) are evaluated first, then the Create Alert action(s), etc.
If you have an Ignore action configured to ignore creating alerts for [Success] requests, Opsgenie will always ignore these and the request will never have a chance to close the alert through the integration.
So I think you actually want to remove the Ignore action entirely. You'd also want to change the Create Alert action's filter from Match All Alerts >> something similar to the Close Alert action - but one that only creates alerts for when [Failed] is in the subject or something.
And finally, edit the Close Alert action to close alerts when [Success] is in the subject or being parsed in the payload. That entire configuration might look something like this:
Note as well in both my screenshots the alias field highlighted. The alias is the unique identifier of an alert, and what the integration uses to close an alert if there is already an open existing alert in Opsgenie. You would need to configure this in all your actions, and it should be consistent with both the create and close request. Otherwise Opsgenie won't know which alert to close.
Hope this helps! Let us know if you have any other questions, concerns, etc.
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...
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