The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

How to create automatic Jira tickets from a slack channel with errors?

Javanshir Mustafayev _ HIT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 11, 2022

I have a slack dev alerts channel:

Screenshot 2022-11-11 at 22.07.06.png

Where the devs wish to have:

Input data - message with alertname equal to DriverIsDead or VpnConnectionLost in dev-alerts channel
Output is a Jira ticket with a specified issue type in the JIRA project. The name of the ticket contains the connector and alertname fields from the message (in any human or machine-readable format. e.g. Dragon Mart 2 Connector: DriverIsDead, because I would like the script not to create a new ticket if there is already an open ticket with the same name)
How can this be achieved?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Stefan Salzl
Community Champion
November 11, 2022

Hi @Javanshir Mustafayev _ HIT 

one question that comes to my mind is:
How do messages appear in slack:m/ where do they come from?

Is it needed to go from 1 system to slack and then from slack to jira? Or could data grabbed from the same system? 

Best
Stefan

Javanshir Mustafayev _ HIT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 14, 2022

Hi @Stefan Salzl 

I was told it is alertmanager

Stefan Salzl
Community Champion
November 15, 2022

Hi @Javanshir Mustafayev _ HIT 

Are those infos from alertmanager sent via API? If so this could be done directly with jira. Alertmanager will send an API call to Jira that an automation rule could grab via a "incoming webhook" trigger and create a ticket automatically.

see webhook trigger docu below:
https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Incoming-webhook

and webhook config docu alertmanager:
https://prometheus.io/docs/alerting/latest/configuration/#webhook_config

 

Best
Stefan

Javanshir Mustafayev _ HIT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 15, 2022

@Stefan Salzl yes, but how do I configure the API access to be safe in terms of security?

Examples are very appreciated

Javanshir Mustafayev _ HIT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 15, 2022

@Stefan Salzl oh, I've misread your reply - the incoming webhook automation trigger is resolving my issue - thank you very very much!

Like • Stefan Salzl likes this
Stefan Salzl
Community Champion
November 15, 2022

AWESOME! I“m happy we could find the right solution.

Thanks for your feedback.

Best
Stefan

Like • Javanshir Mustafayev _ HIT likes this
0 votes
Javanshir Mustafayev _ HIT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 15, 2022

The question is still open, any help is appreciated