Dynatrace workflow Jira integration: open a ticket automatically on a problem (and ServiceNow)

Dynatrace workflow Jira integration: open a Jira or ServiceNow ticket as soon as a Davis problem appears, with context and no duplicate tickets.
Workflow Dynatrace Jira ou ServiceNow : ouvrir un ticket automatiquement sur problème

A Davis problem opens, on-call sees it, then someone copies the title, the affected entity and the link into Jira or ServiceNow by hand. It takes five minutes, gets done badly at three in the morning and is forgotten one time in ten. A Dynatrace workflow Jira integration (or its ServiceNow twin) removes this toil: the ticket opens on its own, with context, as soon as the problem is confirmed.

The reliability gain is concrete: the ticket exists before the engineer even logs in, the opening timestamp is accurate, and MTTR is calculated on clean data rather than late manual entries.

The goal of this tutorial: build a workflow that creates a Jira issue or a ServiceNow incident when a problem opens, with no duplicates, then check that it works. Scope: Workflows (AutomationEngine) exist on Dynatrace SaaS. On Dynatrace Managed, the same need is met by problem notification integrations, described at the end of the article.

Prerequisites

  • A Dynatrace SaaS environment with the Workflows app and the rights to create and run a workflow.
  • On the Jira side: a site URL, a service account, a Jira API token and a target project. On the ServiceNow side: an instance and an integration account allowed to create incidents.
  • The matching connector app installed from the Hub (Jira or ServiceNow connector). Exact app and action names may vary between versions: check them in the Hub and in the Workflows documentation.
  • Well-targeted problems: if your environment generates too many, start by reducing Davis alert noise. An automatic ticket on a noisy alert only moves the noise elsewhere.

Building the Dynatrace workflow Jira integration step by step

Step 1: create the connection

In the Jira connector app settings, add a connection: site URL (for example https://your-company.atlassian.net), service account email and Jira API token. For ServiceNow, enter the instance URL and the integration account credentials.

Use a dedicated service account, not a personal one: the day that person leaves the team, tickets keep opening. Limit its rights to the target project only.

Step 2: choose the trigger

Create a workflow and choose the Davis problem event trigger. Set it to react only to active problems and filter the scope:

  • problem category: availability and errors, for example, rather than every category;
  • affected entities: filter on a tag such as team:payments, so each team has its own workflow and project.

This filtering is the most important decision in the tutorial. A workflow that opens a ticket for every minor problem produces a queue nobody reads.

Step 3: avoid duplicates

A problem can be updated several times and re-trigger the workflow, depending on the settings. Add a “Run JavaScript” task that reads the triggering event and prepares a deduplication key:

import { execution } from '@dynatrace-sdk/automation-utils';

export default async function ({ execution_id }) {
  const ex = await execution(execution_id);
  const event = ex.params.event;

  return {
    displayId: event['display_id'],
    label: 'dt-' + String(event['display_id']).toLowerCase(),
    title: event['event.name'],
    category: event['event.category'],
  };
}

Critical line: ex.params.event holds the event that triggered the workflow. The label key (for example dt-p-240123) serves as a Jira label or a ServiceNow correlation reference: you search for a ticket carrying it before creating one.

Next, add a Jira search task (a JQL issue search action, if your connector offers one) with the query:

project = OPS AND labels = "{{ result("prepare_key").label }}" AND statusCategory != Done

Give the creation task a condition so it only runs when the search returns no issue. The task condition editor accepts an expression; check its exact form in the editor’s contextual help.

Step 4: create the Jira issue

Add the Jira create issue action, select the connection from step 1, then fill the fields with expressions:

Project     : OPS
Type        : Incident
Summary     : [{{ result("prepare_key").displayId }}] {{ result("prepare_key").title }}
Labels      : {{ result("prepare_key").label }}, dynatrace
Description :
  Dynatrace problem {{ event()["display_id"] }}
  Category: {{ event()["event.category"] }}
  Start: {{ event()["event.start"] }}
  Opened automatically by a workflow. Analysis and root cause in Dynatrace.

Add the link to the problem in your environment to the description. The exact URL format depends on your version’s Problems app; copy one from the UI to build the template.

Step 4b: the ServiceNow variant

With the ServiceNow connector, replace the Jira action with the create incident action. The usual fields of the incident table:

short_description : [{{ result("prepare_key").displayId }}] {{ result("prepare_key").title }}
description       : Dynatrace problem {{ event()["display_id"] }}, category {{ event()["event.category"] }}
correlation_id    : {{ result("prepare_key").label }}
urgency           : 2
impact            : 2
assignment_group  : <your-group>

The correlation_id field replaces the Jira label for deduplication. Map urgency and impact to your ITSM priority matrix rather than sending everything as priority 1.

Step 5: react when the problem closes

Create a second workflow, triggered on closed problems, that finds the ticket by its label and adds a “resolved on the Dynatrace side” comment. Leave closing the ticket to a human: that is the moment to complete the cause and decide on a postmortem. To structure that review, see the blameless postmortem with DQL.

How to check that it works

  1. Run the workflow manually from the editor, choosing a recent problem as the sample event if the option is available.
  2. Open the execution history: every task should be green. A failed task shows the error returned by Jira or ServiceNow (401 = credentials, 400 = missing required field, often the issue type).
  3. Check in Jira that an issue carries the dt-p-… label. Run the execution again: no second issue should appear.
  4. On SaaS, compare with the actual problems:
    fetch dt.davis.problems, from:now()-24h
    | filter event.status == "ACTIVE"
    | fields display_id, event.name, event.category

    Every problem in the filtered scope should have its ticket.

Best practices

  • One workflow per team, filtered by tag, rather than one global workflow: each ticket lands in the right project.
  • Always deduplicate on the problem ID: a queue full of duplicates loses the teams’ trust.
  • Context, not volume: add a DQL query for the affected entity’s error logs, as in the Workflows module of the SaaS course, rather than generic text.
  • Monitor the workflow itself: an expired Jira token silently stops ticket creation. A notification on execution failure is enough.
  • Test in a sandbox project before pointing at the production project.

Frequently asked questions

How do I do the same on Dynatrace Managed?

Managed has no Workflows. Use the problem notification integrations (Jira, ServiceNow or custom webhook), paired with an alerting profile that filters the scope. The approach is detailed in alerting profiles and notification integrations.

Should I keep the notification integration if I have a workflow?

No, not for the same scope: both would create duplicate tickets. Migrate team by team and disable the old integration once the workflow is validated.

Can I call the Jira API directly with an HTTP request?

Yes, the HTTP request action allows it, with credentials stored securely and the Jira domain allowed in the environment settings. The connector remains simpler to maintain; the HTTP request is for a field or endpoint it does not cover.

Conclusion

A well-filtered, deduplicated workflow turns each Davis problem into a usable ticket, with no manual entry. On-call gains a few minutes per incident, MTTR becomes measurable, and the incident review starts from reliable data. Start with one team and one project, then expand.

span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of its owner. Jira and ServiceNow are trademarks of their respective owners. Action names change: check them in the official documentation.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
Requêtes DQL exemples : 15 requêtes prêtes à copier avec DQL summarize, filter et timeseries

DQL query examples: 15 ready-to-copy queries with DQL summarize, filter and timeseries

Next Post
OpenTelemetry Python FastAPI : instrumenter une API vers Dynatrace sans OneAgent

OpenTelemetry Python FastAPI: instrument an API for Dynatrace without OneAgent

Related Posts