[ZBXNEXT-1001] priority/severity translation in notification macros Created: 2011 Oct 18  Updated: 2012 Oct 20

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: None
Affects Version/s: 1.8.8, 2.0.1
Fix Version/s: None

Type: New Feature Request Priority: Major
Reporter: Garth Dahlstrom Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: macros, patch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File 2keys.ca-trigger.bugtracker.priority.code-zabbix-trunk-22612M-2011-10-21.patch    

 Description   

My company (2Keys.ca) would like to use Zabbix + JIRA to track service problems and their resolutions. The basic concept is that Zabbix will send an email alert to a support team and a JIRA mailbox, the mail will contain the usual alert info as well as info which JIRA would use to identify the issue and create/update/resolve a ticket.

There are a couple of reasons why this is worth doing:

  • the problems become tracked in a permanent audit trail, to which support techs can add comments and managers can review details.
  • JIRA can be used later on to summarize problems and link them back to the software or infrastructure projects [also in JIRA] which triggered the problems for a proper resolution.

In addition to setting up JIRA (or bugzilla) to parse emails and create tickets using the email-to-ticket APIs, Zabbix will need to expose a couple of bits of data not currently available via macros:
1) the Origin Event ID (please see the patch I provided for ZBXNEXT-384)
2) the Bug Tracker Priority which is a string "Blocker", "Critical", "Major" .... which correspond to "Disaster", "Critical", "Average" trigger severities

Please take a look at the attached patches which add the capability for #2 and incorporate them upstream and/or provide feedback.
[www.2keys.ca assigns copyright for this code to zabbix.com for distribution under GPLv2 and any other licenses zabbix.com sees fit.]



 Comments   
Comment by richlv [ 2011 Oct 18 ]

to be really useful the mapping should be user configurable, though, as your jira priorities already are different from the ones used here

Comment by Garth Dahlstrom [ 2011 Oct 18 ]

@richlv... my bad, the stock JIRA priorities are supposed to map against the stock Zabbix severities (they do in the patch, I mistyped it in the original description)... Here's the corrected full mapping is:
Zabbix Disaster = JIRA Blocker
Zabbix High = JIRA Critical
Zabbix Average = JIRA Major
Zabbix Warning = JIRA Minor
Zabbix Information = JIRA Trivial

I do see in Trunk that the Zabbix values are now coming from the DB, and though it'd be a fair bit more work (changes to frontend + SQL), I'd be willing to undertake that work if you'll accept both the 1.8.x patch (as it is, since 1.8.x can't configure Zabbix severities anyway) and the new trunk patch once I've finished doing all the work.

Comment by richlv [ 2011 Oct 18 ]

it is unlikely for new significant features to appear in 1.8 branch at this time, and unfortunately the 2.0 roadmap is pretty fixed (mostly just to ensure it gets released at all...), so i don't see patches being integrated soon.

it would be mostly useful if the mapping was fully user customisable, as then it would also work with other trackers

Comment by Garth Dahlstrom [ 2011 Oct 21 ]

I've redone the patch against trunk with configurable mapping values found next to the severity configuration in Admin->General->Trigger Severity.

This patch replaces the other ones... maybe it can go into Zabbix 2.1?

Comment by richlv [ 2011 Oct 24 ]

oh, that's kinda awesome. while it's really hard to say what will happen after 2.0, this might be useful to get votes for to make it more visible to devs

in the meanwhile, if you have the time, you could take a look at https://zabbix.org/wiki/Docs/specs/coding_style , maybe there's some minor detail to improve

Generated at Sat Apr 12 03:10:49 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.