We use cookies to ensure that we give you the best experience on our website.  Visit our Privacy Policy to learn more. If you continue to use this site, we will assume that you are okay with it.

Your choices regarding cookies on this site.
Your preferences have been updated.
In order for the changes to take effect completely please clear your browser cookies and cache. Then reload the page.

Werk #7195: Jira: Notification plugin

TitleJira: Notification plugin
Date2019-03-06 20:43:06
Checkmk EditionCheckmk Enterprise Edition (CEE)
Checkmk Version1.6.0b1
LevelProminent Change
ClassNew Feature
CompatibilityCompatible - no manual interaction needed

Check_MK now supports integration with Jira. You can create issues for Host an Service Problems and optional set a resolution on recovery notifications.

In Jira you have to add two custom fields to your project screen as described here.

In Check_MK, under "WATO - Notifications", create a new notification rule and select Jira.

Parameters to set:

  • JIRA URL: The URL to your Jira environment
  • User Name: Jira username
  • Password: Jira password
  • Project ID: The Project ID the issues should be created in
  • Issue type ID: The issue type ID
  • Host custom field ID: The first custom field ID you created in Jira
  • Service custom field ID: The second custom field ID you created in Jira
  • Monitoring URL: URL of your Check_MK environment to create hyperlinks back to Check_MK (eg. https://server/site)
  • Priority ID: The priority ID (optional)
  • Summary for host notifications: The summary the created host issue should use (optional)
  • Summary for service notifications: The summary the created service issue shoud use (optional)
  • Label: Label for Jira issues. If not set, 'monitoring' will be used. (optional)
  • Activate resultion with following resolution transistion ID: If set, the created issue will be resolved with the configured resolution ID (optional)
  • Set optional timeout for connections to JIRA: Timeout in seconds, default is 10 (optional)

You need different Jira IDs to open/resolve issues. There are different ways to get this IDs:

  • Jira_support
  • Retrieve with the a script (example: project_id):
#!/usr/bin/env python

import requests

JIRA_SERVER = "https://jira.server.your-domain.de"

sess = requests.Session()
sess.auth = (USER, PW)
resp = sess.get("%s/rest/api/2/project" % JIRA_SERVER, verify=False)

project_id = [item["id"] for item in resp.json() if item["key"] == PROJECT_KEY][0]

For issuetype and priority ID use:

resp = sess.get("%s/rest/api/2/issuetype" % JIRA_SERVER)
resp = sess.get("%s/rest/api/2/priority" % JIRA_SERVER)

More information about the Jira API can be found here.