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

Add note to newly created Opsgenie alert Edited

What I'm doing is funneling all alerts through opsgenie to have it create a jira service desk ticket. The issue is, the note field in the opsgenie alert will not get sent to jira service desk as a comment when you first create the alert. Support as said this will not work. You MUST add a note AFTER the opsgenie alert has been created. I've verified this works manually.

Now I'm trying to automate this. I'm not sure exactly what criteria to use to go find that newly created alert (that I have no idea what the ID is since this is automated) and then add a note to it. Below is all the information you can pull back from an alert. Everything I'm writing is in powershell

I do put unique tags and alias in my initial creation for my opsgenie alert

This would be so much simpler if Opsgenie just passed the note field to Jira Service Desk when creating the alert for the first time, but that's not an option apparently.

 

There is a "createdAt" field, but I have no idea what the query syntax in the url would be to find something created in the last 15 minutes and pull that id to then send a note.



{
"data": {
"id": "70413a06-38d6-4c85-92b8-5ebc900d42e2",
"tinyId": "1791",
"alias": "event_573",
"message": "Our servers are in danger",
"status": "closed",
"acknowledged": false,
"isSeen": true,
"tags": [
"OverwriteQuietHours",
"Critical"
],
"snoozed": true,
"snoozedUntil": "2017-04-03T20:32:35.143Z",
"count": 79,
"lastOccurredAt": "2017-04-03T20:05:50.894Z",
"createdAt": "2017-03-21T20:32:52.353Z",
"updatedAt": "2017-04-03T20:32:57.301Z",
"source": "Isengard",
"owner": "morpheus@opsgenie.com",
"priority": "P5",
"responders":[
{
"id":"4513b7ea-3b91-438f-b7e4-e3e54af9147c",
"type":"team"
},
{
"id":"bb4d9938-c3c2-455d-aaab-727aa701c0d8",
"type":"user"
},
{
"id":"aee8a0de-c80f-4515-a232-501c0bc9d715",
"type":"escalation"
},
{
"id":"80564037-1984-4f38-b98e-8a1f662df552",
"type":"schedule"
}
],
"integration": {
"id": "4513b7ea-3b91-438f-b7e4-e3e54af9147c",
"name": "Nebuchadnezzar",
"type": "API"
},
"report": {
"ackTime": 15702,
"closeTime": 60503,
"acknowledgedBy": "agent_smith@opsgenie.com",
"closedBy": "neo@opsgenie.com"
},
"actions": ["Restart", "Ping"],
"entity": "EC2",
"description": "Example description",
"details": {
"serverName": "Zion",
"region": "Oregon"
}
},
"requestId": "9ae63dd7-ed00-4c81-86f0-c4ffd33142c9"
}

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Asked in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

12,840 views 23 17
View question

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