We've just purchased JSM and moved our Opsgenie instance under that umbrella. We're using the JSM integration so alerts in Opsgenie are creating issues in JSM.
In the Opsgenie GUI, we can see the linked issue, but how do we get that JSM issue ID with the Opsgenie API?
One work-around we're exploring for this is querying the alert logs:
https://docs.opsgenie.com/docs/alert-api-continued#list-alert-logs
We're seeing a log entry that gives the JSM ID and can be parsed. Here's what one looks like:
{
"log": "jira-service-management-cloud [JSM Tech Support Hub Alert Integration] ExecutionStatus[succeed] Issue created with id: [17308] key: [TSH-7154]",
"type": "system",
"owner": "System",
"createdAt": "2023-02-21T14:01:41.712Z",
"offset": "1676988101000_1676988101712151000"
}
The problem with this is how/when to do this. I guess we can setup an OEC that executes for all JSM-eligible alerts. Have it sleep for a bit, query the logs, and then add the JSM id back to the alert as a tag. Still seems a bit of a kludge.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.