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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can you test your notifications when your on-call roster starts?

Every Opsgenie team has an on-call roster with their team members. As a team member, when you start your on-call week, how can you be sure that your notifications are setup correctly? This is essential as you don't want to miss any calls from a potential high priority alert.

Opsgenie's REST API allows both creating and deleting an alert.

Here is an example of how you can generate a test P1 alert:

curl -X POST https://api.opsgenie.com/v2/alerts \
-H "Content-Type: application/json" \
-H "Authorization: GenieKey $API_KEY" \
-d \
"{
\"message\": \"Notification test\",
\"alias\": \"notification-test-<random_id>\",
\"description\":\"Test notification\",
\"responders\":[
{\"name\":\"$TEAM_NAME\", \"type\":\"team\"}
],
\"visibleTo\":[
{\"name\":\"$TEAM_NAME\",\"type\":\"team\"}
],
\"priority\":\"P1\"
}"

You can place this in a Bamboo plan or any build tool that can schedule this script to run after your on-call roster starts. Eg. run every Monday at 9 AM.

When this build is run, the person on-call on that week would receive a phone call, which confirms the person's notifications are setup correctly.

This method can also be used to ensure your other types of notifications as Slack are working properly every week.

As a best practice, it would be a good idea to clean up this test alert after a few minutes in the same build. So this alert won't come up in any of your reports.

Here is how you can delete the test alert created earlier:

curl -X DELETE "https://api.opsgenie.com/v2/alerts/$id?identifierType=id" \
-H "Authorization: GenieKey $API_KEY"

 Hope this brings confidence to the person coming into the roster schedule.

1 comment

tjohnson I'm New Here Sep 17, 2021

I would find it very useful if there was test button that could be used to verify a user has their notification information entered correctly.

Like Kevin Krouse likes this

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Opsgenie

Leveraging Atlassian’s Opsgenie and AWS Cloudformation Registry to stay ahead of incidents

In the past, managing IT infrastructure was a hard job. It required a lot of manual effort and it was hard to keep track of all the necessary information (monitoring, scalability etc). Thankfully, as...

1,856 views 0 11
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