Module: check_mk
Branch: master
Commit: d3d544b9e3a0c4177c285147306a3504d5a69bbe
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d3d544b9e3a0c4…
Author: Ronny Bruska <rb(a)mathias-kettner.de>
Date: Fri Mar 8 13:42:38 2019 +0100
fixed broken werk text
Change-Id: Ie6c7466eec69d5413e81c1c5d62601037361a931
---
.werks/7195 | 44 ++++++++++++++++++++++++--------------------
1 file changed, 24 insertions(+), 20 deletions(-)
diff --git a/.werks/7195 b/.werks/7195
index 1cdec02..1f931d1 100644
--- a/.werks/7195
+++ b/.werks/7195
@@ -10,7 +10,7 @@ Class: feature
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
[
https://confluence.atlassian.com/adminjiraserver/adding-a-custom-field-9388…
here].
+In Jira you have to add two custom fields to your project screen as described <a href
"https://confluence.atlassian.com/adminjiraserver/adding-a-custom-field-938847222.html">here</a>.
In Check_MK, under "WATO - Notifications", create a new notification rule and
select Jira.
Parameters to set:
@@ -30,30 +30,34 @@ Parameters to set:
<i>Set optional timeout for connections to JIRA<i>: Timeout in seconds,
default is 10 (optional)
You need different Jira IDs to open/resolve issues. There are different ways to get this
IDs:
-LI:
[
https://confluence.atlassian.com/jirakb/how-to-get-project-id-from-the-jira…
Jira_support]
+LI: <a
href="https://confluence.atlassian.com/jirakb/how-to-get-project-id-fr…
LI: Retrieve with the a script (example: project_id):
-F+:#!/usr/bin/env python
-F+:
-F+:import requests
-F+:
-F+:USER = "JIRA_USERNAME"
-F+:PW = "JIRA_PASSWORD"
-F+:PROJECT_KEY = "JIRA_PROJECT_NAME"
-F+:JIRA_SERVER = "https://jira.server.your-domain.de"
-F+:
-F+:sess = requests.Session()
-F+:sess.auth = (USER, PW)
-F+:resp = sess.get("%s/rest/api/2/project" % JIRA_SERVER, verify=False)
-F+:
-F+:project_id = [item["id"] for item in resp.json() if item["key"] ==
PROJECT_KEY][0]
-F+:print(project_id)
+F+:example_script.py
+#!/usr/bin/env python
+
+import requests
+
+USER = "JIRA_USERNAME"
+PW = "JIRA_PASSWORD"
+PROJECT_KEY = "JIRA_PROJECT_NAME"
+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]
+print(project_id)
+F-:
For issuetype and priority ID use:
-F+:resp = sess.get("%s/rest/api/2/issuetype" % JIRA_SERVER)
-F+:resp = sess.get("%s/rest/api/2/priority" % JIRA_SERVER)
+F+:example_script.py
+resp = sess.get("%s/rest/api/2/issuetype" % JIRA_SERVER)
+resp = sess.get("%s/rest/api/2/priority" % JIRA_SERVER)
+F-:
-More information about the Jira API can be found
[
https://docs.atlassian.com/software/jira/docs/api/REST/7.12.0 here].
+More information about the Jira API can be found <a href
"https://docs.atlassian.com/software/jira/docs/api/REST/7.12.0">here</a>.
CMK-1185