ITSM integration_datavisualisation_zabbix (1)
ITSM integration_datavisualisation_zabbix (1)
ARTŪRS LONTONS
TECHNICAL SUPPORT ENGINEER
WHY INTEGRATE WITH OTHER TOOLS?
In addition to Zabbix, may organizations use centralized ITSM systems. These can be
populated with manual tasks, but they can also receive events from Zabbix.
Automatically create events/incidents in your ITSM system
Define assignees for your issues, task lists, SLA's, etc.
Provide additional information about the issue
Automatically resolve the issues in the ITSM system as soon as they are
resolved in Zabbix
2
VAST SELECTION OF INTEGRATIONS
Ever since implementing Webhook media type, Zabbix development team has kept releasing new
integrations for the most popular ITSM and messaging solutions
33
PREPARING OUR ENVIRNMOMENT
Let's focus on one of these new webhook based media types and see how we can integrate Zabbix
with ServiceNow in a few simple steps.
*https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/media/servicenow
44
SERVICENOW MEDIA TYPE
Most of our media types will always have fields that
require additional input from our side
55
SERVICENOW MEDIA TYPE
We can also add custom fields and deliver custom
information to our ServiceNow issue.
66
PROCESSING TAGS AND GENERATING MENU ENTRIES
In the media type we need to specify that we wish to process JSON values as tags
We also need to define which tags will be used for the menu entry URLS
7
ADDING ADDITIONAL INFORMATION TO THE PROBLEM
By selecting "Process tags" in the Media type we will process the returned JSON values as
additional tags with which we can populate the existing problem events
The list of processed values/tags is defined in the JS code of the webhook
if (process_tags) {
result.tags.__zbx_servicenow_sys_id = response.sys_id;
result.tags.__zbx_servicenow_link = params.servicenow_url +
(params.servicenow_url.endsWith('/') ? '' : '/') + 'incident.do?sys_id=' +
response.sys_id;
result.tags.__zbx_servicenow_number = response.number;
}
8
SERVICENOW JSON RESPONSE EXAMPLE
{ ...
"result":{ "sys_id":"e0f8dbb72fb97010ea685d8b2799b67a",
"parent":"", "contact_type":"",
"made_sla":"true", "reopened_by":"",
"caused_by":"", ...
... "correlation_id":"",
"task_effective_number":"INC0010027", "location":"",
"approval_history":"", "category":"inquiry"
"number":"INC0010027", }
... }
We are interested in grabbing only task number and sys_id. They will be used to create a meny entry
on the problem and generate a URL linking to the ServiceNow incident
9
PROCESSING TAGS AND GENERATING MENU ENTRIES
The resulting problem entry will contain menu links and tags populated from the JSON response
10
CREATING A SERVICE USER
We also need to create a ServiceNow user in Zabbix and assign media with the ServiceNow URL
to it
11
CREATING AN ACTION
When creating actions that will invoke our ServiceNow integration, we can utilize it for any type of
operation:
Send problem alerts
Send recovery messages
Update existing issues when the problem event gets updated
12
SNOW INTEGRATION - TESTING
To test my ServiceNow integration I signed up for a ServiceNow development instance
This grants me access to dev tools and the ServiceNow incident management
13
SNOW INTEGRATION – USER PERMISSIONS
The API user needs to have at least the following permissions:
rest_api_explorer
sn_incident_write
14
SNOW INTEGRATION – ACTIVITIES
The problem message gets displayed in the description field of the incident
15
SNOW INTEGRATION – PROBLEM UPDATES
Subsequent problem updates and recovery messages get displayed in the Activity feed:
16
SNOW INTEGRATION – ADDITIONAL INFORMATION
To add some additional information and make your integration more robust, we can utilize
built-in and user macros
In this example I will update my message template with a problem event URL
I will use built-in and user macros to achieve this
Create a {$ZABBIX.URL} global user macro
17
SNOW INTEGRATION – ADDITIONAL INFORMATION
Combine {$ZABBIX.URL} user macro with built in macros – {TRIGGER.ID} and {EVENT.ID}
18
SNOW INTEGRATION – ADDITIONAL INFORMATION
This way our incident in SNOW will now contain a direct URL redirecting us to the event:
19
SNOW INTEGRATION – TROUBLESHOOTING
As with all other media types, make sure that you have created a ServiceNow user and assigned
a ServiceNow media to it
Make sure that the Media contains a proper service now URL
20
SNOW INTEGRATION – TROUBLESHOOTING
Make sure that your servicenow_user and servicenow_password parameters are defined
correctly in the media type
Make sure that the ServiceNow user has proper API permissions
21
SNOW INTEGRATION – NOTES
The integration is one-way, meaning changes performed in Zabbix will be reflected in
ServiceNow, but not the other way around.
When performing additional customizations – adding new fields, changing user roles, etc., make
sure that you are referring to the correct version of the ServiceNow documentation
Keep an eye out on the Zabbix release notes. The Media types may get updated and change
from time time.
22
QUESTIONS?
ARTŪRS LONTONS
TECHNICAL SUPPORT ENGINEER
THANK YOU!
ARTŪRS LONTONS
TECHNICAL SUPPORT ENGINEER