Greetings!
I am sending JSON POST to Jira to create 'tickets' as a trigger action. No worries there. What I want to do is to log the Jira Ticket number given in the response to the alert that created the ticket. Is this possible?
Thanks!
Not likely.
Not out of the box, but you could write a script to make the post and then have the result set to update another entry via the API. You couldn't use the "HTTP Post" alert action, but use the "Execute an external program" action instead.
I don't have a code sample of this, but it shouldn't be very hard if you are familiar with JSON and a scripting language of your choice.
I'm also trying to do the exact same thing, but using a different service desk system. It's theoretically possible, but not using HTTPS because JIRA will be unable to trust the connection. The article here specifically states:
"The Solarwinds-Orion certificate, which is used in Information Service, RabbitMQ, and others, is generated during the initial installation or configuration of the product and cannot be modified manually. Attempting to do so will affect the functionality of the product and will affect communication with any deployed agents, polling engines, High Availability servers, web servers, and legacy tools on the server. Communication within different services on the main polling engine will also be affected."
So a self-signed cert is installed during setup which you can't replace and it renders the API unusable for external systems. Certainly secure, but definitely pointless!
Maybe I'm misreading, but I think the original ask was only for Orion --> Jira integration. If that's the case, then the Jira API should return the case information (CASE-00201) in the response or response headers. That can be consumed by the custom script and then updated in the alert (as an alert note or something). From my reading, there's no need to actually have Jira 'push" information to the Orion systems.
Perhaps but, because the OP said they wanted to 'log the Jira Ticket number given in the response to the alert', I assumed they wanted to give the alerting object in Orion the ticket number?I agree that writing TO Jira should be easy (I got that bit done), but joining the circle and giving an object the reference number for the call it created was impossible because of the self-signed cert. We eventually got round it by using haproxy.
I do something like this with my alert integrations for some tools. I use my script to process to response and then post it back to Orion as alert notes, AUTOSNOW INC1234567 or AUTOJIRA CASE-12345, etc. Then I just added logic to my custom alert widget to left join those kinds of notes as another column.