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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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 to attach alert action output to Opsgenie

Hello, I am working on creating custom actions and wondering:

A. Is it possible to attach the output from a triggered custom action to the alert once the action runs.  It seems like this is possible in the documentation as I see ping.py referenced in the docs, but I can't find an example.  I think that I will need to pass the alertId to the action so the output can be attached to the proper alert, not sure how to pass that and hoping to shortcut the research.

B. If A above is possible, does anyone have an example they are willing to share.

 

Thanks in advance.

-Rich

1 answer

0 votes
Robert Atlassian Team Nov 17, 2020

Hi @Richard Bocchinfuso !

 

The alertId will be sent in the payload for whatever custom action you are performing. If you capture the output of whatever command you are looking to execute (ping or traceroute for example) you can use the addNote endpoint on the Alert API to attach the text to the alert that triggered it. 

 

https://docs.opsgenie.com/docs/sample-alert-action-data

https://docs.opsgenie.com/docs/alert-api#add-note-to-alert

 

That's just an example of when you'd want the output attached to the alert, but you could also use it to take some other action on the alert that's supported through the API (snooze, acknowledge, close, create an incident, etc.). 

 

Hope this helps!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Opsgenie

New! Investigate and re-deploy stable deployments from the Incident Investigation view in Opsgenie

We’re excited to announce the latest enhancement to Opsgenie’s Incident Investigation view. Now when an incident occurs users can select the previous stable deployment, and begin the redeployment pro...

305 views 0 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