Avoid a duplicate ticket with Datadog and Jira integration

Anthony Morais August 24, 2022

In my environment I have an integration of Datadog and JSM, that is, when there is an alert, a ticket is created automatically.
I would like to know if there is a way to create an automation that, if there is already an open ticket, do not open another one.

3 answers

1 vote
bmccoy
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 29, 2022

Hi!

I'm not sure how the current integration is set up, but it can be a bit tricky to prevent tickets from being created unless it is automation that is creating them.  However, you should be able to set up an automation that will close an issue as a duplicate.

  • Listen to issue created events,
  • Filtering the automation down to just those that come from datadog (e.g. via issue type or labels).  
  • Check if there are any other issues that have the same description/summary/custom fields (or however you plan to identify the duplicates)
  • If yes, close the ticket.

It might look something like this:

Automation - Code Barrel JIRA 2022-08-30 09-05-44.png

Cheers,
Brydie

Anthony Morais August 31, 2022

Isso não seria o ideal para mim, mas ajudaria se você adicionasse na automação, depois de Concluído, incluir um comentário de que o ticket criado anteriormente (se estiver no status Aberto) já está sendo tratado. Seria algo assim:

This ticket is already being handled in ticket {{issue.key}}


Marlon Bacala June 7, 2023

Hi. Can you guys tell me where do I set this app.

Diana_Architect_ZigiWave
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 7, 2023

@Marlon Bacala which app? Jira Automation?

Marlon Bacala June 7, 2023

@Diana_Architect_ZigiWave  it is this https://www.atlassian.com/devops/observability-tutorials/jira-datadog-integration

I integrated datadog with Jira. It seems to be working since I followed this document https://www.atlassian.com/devops/observability-tutorials/jira-datadog-integration. However I got stuck in section 2 (Automatically create issues from Datadog alerts). Ticket is automatically created once alert is triggered however it creates a duplicate ticket when alert is re triggered. Can anyone help thanks.

0 votes
Gabriel Furstenheim August 14, 2023

In case anybody stumbles into this problem again, the expression is in the right path, but it is far from correct.

 

Something like this is more correct (but still not perfect):

 

```

status NOT in ('Done') AND key != {{triggerIssue.key}} AND summary ~ '{{triggerIssue.summary.replaceAll("\\]", "\\\\\\\\]").replaceAll("\\[", "\\\\\\\\[")}}'

 

```

 

You need to avoid checking the issue against itself or against closed tickets. But then, you also need to escape the characters in the summary. In particular `[`which is a parameter in datadog

0 votes
Diana_Architect_ZigiWave
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 6, 2022

@Anthony Morais hi! Hope you've found the reason behind the duplication issue. May I ask if you're using any additional tools to establish the integration? Perhaps the problem comes from it? I'd go back and see if the mappings are set properly. If, at some point in the future you happen to have a similar project and you're open to using a 3rd party solution - check out ZigiOps. It can help you connect the two systems and sync their data. It had advanced mapping settings so it would not allow any duplication. Feel free to look at it and if you decide you'd like to know more about it work - you can secure a demo meeting.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events