integrating zabbix with alerting and itsm systems the easy way€¦ · 35. integration example -...
TRANSCRIPT
![Page 1: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/1.jpg)
Integrating Zabbix with alerting and ITSM systems the easy way
![Page 2: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/2.jpg)
2
Zabbix - Reacting to problemsWithout a doubt - Zabbix is THE BEST monitoring tool out there -many monitoring approaches can be used for different infrastructures
![Page 3: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/3.jpg)
3
Zabbix - notificationsBut monitoring is just the first step!
What can we do when there is a problem?
![Page 4: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/4.jpg)
4
Zabbix - notificationsWe define Actions which contain conditions and operations!
![Page 5: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/5.jpg)
5
Media typesMedia are the delivery channels used for sending notifications and alerts from Zabbix.
● Email ● SMS● Script
And, as of 4.4:● Webhook
![Page 6: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/6.jpg)
6
EmailReact to events by notifying your team members via e-mail.
● As of 4.2 the message can either be HTML or Plain text● Configure the SMTP parameters● Create the media for your individual users● Test it…● ...Not by simulating a problem! Use the Test button! (new in
4.2)
![Page 7: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/7.jpg)
7
SMS● Simple to configure● Requires a GSM modem attached● Tested models provided in the documentation● Connected via a serial port or USB● More complex configuration in case of a virtualized
environment● Create the media for your individual users
![Page 8: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/8.jpg)
8
Alert script● Executed by the Zabbix server● Used to integrate Zabbix with 3rd
party systems● Can pass Macros as parameters● Can be written in any language● Examples available on Zabbix
share or the Integrations section
![Page 9: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/9.jpg)
9
Out of the box integrationsAnd that was pretty much it for Zabbix 4.0! You were fully expected to create and use your own alert scripts for integration or use the community provided solutions.
![Page 10: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/10.jpg)
10
Out of the box integrationsProblem: How can we provide portable out of the box integrations?Solution:Zabbix 4.2 - Support of JavaScript (in preprocessing)Zabbix 4.4 - Webhooks and programmable logic for actions and notifications
![Page 11: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/11.jpg)
11
WebhooksHow do the webhooks actually work?
● Passes the event related parameters
● Uses the provided API token
● Specify the endpoint in the parameter
![Page 12: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/12.jpg)
12
Webhooks - scriptThe most important part of the webhook is the script:
![Page 13: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/13.jpg)
13
Webhooks - script- Oh, I still have to write the script though… :(
Not anymore! WE provide the script! It’s available out of the box or you can simply import it from our git repo!
![Page 14: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/14.jpg)
14
Script vs WebhooksHow else is this better than a custom script? It’s Portable!export/import the media type: Copy your API token:
![Page 15: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/15.jpg)
15
Webhooks - additional configurationStarting with Zabbix 5.0 you can now specify HTTP Proxy as a parameter in Webhooks (Same logic as for HTTP agent item)
![Page 16: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/16.jpg)
16
Webhooks - additional configurationWith Webhooks we can also populate our tags with data from the external system, for example:
● Channel ID● Channel name● Message link● And many more
![Page 17: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/17.jpg)
17
Webhooks - additional configurationYou can add a direct link to the ticket:
![Page 18: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/18.jpg)
18
Webhooks - tagsHow are the tag values obtained?
The returned JSON response should contain our tags:
![Page 19: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/19.jpg)
19
Webhooks - tagsOnce again - we should use JavaScript to format our returned data accordingly:
![Page 20: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/20.jpg)
20
Integration example - legacy approachLet’s take a look at the steps needed to implement Zabbix integration with Slack WITHOUT using Webhooks - the legacy way!
As an example we will use zabbix-notify. A solution available on our community share
● Featured integration● Uses AlertScript● Written in Perl
![Page 21: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/21.jpg)
21
Integration example - legacy approach● Step 1: Install the required modules and dependencies
We need to make sure that LWP and JSON::XS modules are
installed.
The command depends on your favorite flavor of a package
manager, for example:yum install perl-JSON-XS perl-libwww-perl perl-LWP-Protocol-https perl-
parent
![Page 22: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/22.jpg)
22
Integration example - legacy approach● Step 2: Download the .tar and install it into your system
perl Makefile.PL INSTALLSITESCRIPT=/usr/local/share/zabbix/alertscriptsmake test
make install
INSTALLSITESCRIPT should point towards your AlertScriptsPath directory, as per your Zabbix server
configuration.
![Page 23: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/23.jpg)
23
Integration example - legacy approach● Step 3: Create a slack Application
![Page 24: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/24.jpg)
24
Integration example - legacy approach● Step 4: Create a slack bot user
![Page 25: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/25.jpg)
25
Integration example - legacy approach● Step 5: Install app into your workspace
![Page 26: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/26.jpg)
26
Integration example - legacy approach● Step 6: Obtain your bot token
![Page 27: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/27.jpg)
27
Integration example - legacy approach● Step 7: Create a new media type and provide the token
![Page 28: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/28.jpg)
28
Integration example - legacy approach● Step 8: Create a new media for your users
![Page 29: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/29.jpg)
29
Integration example - legacy approach● Step 9: Create an action
![Page 30: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/30.jpg)
30
Integration example - legacy approach● Step 10: Receive your slack alerts!
![Page 31: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/31.jpg)
31
Integration example - legacy approachLet’s summarize the additional tasks we had to do to implement such an integration:
● Download and configure the script● Install custom modules● Test the integration manually
Some compatibility issues may also be encountered!
![Page 32: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/32.jpg)
32
Integration example - legacy approach● No guaranteed long-term support
● Possible dependency/compilation issues based on the underliying OS
![Page 33: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/33.jpg)
33
Integration example - WebhooksNow, let’s look at our official Slack integration!
● Step 1: Repeat steps 3-6 to create a slack Application and obtain the bot user token!
● Step 2: Create a {$ZABBIX.URL} macro which will contain a link to your Zabbix instance
● Step 3: Import the media type● Step 4: set bot_token to the previously created token● Step 5: Create a media for the corresponding user
![Page 34: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/34.jpg)
34
Integration example - WebhooksAnd you’re done! Let’s look at our Slack alert:
![Page 35: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/35.jpg)
35
Integration example - WebhooksWhile the amount of performed steps is very similar, the integration was quite a bit more streamlined:
● No additional module or script download necessary● The script was contained in the imported integration● Really easy to do even for users not familiar with Zabbix
configuration● Fully done within Zabbix and Slack, no need to execute any
commands on the OS!● Guaranteed future support and additional updates!
![Page 36: Integrating Zabbix with alerting and ITSM systems the easy way€¦ · 35. Integration example - Webhooks. While the amount of performed steps is very similar, the integration was](https://reader033.vdocuments.net/reader033/viewer/2022051811/601cfb59fb2af757365c231e/html5/thumbnails/36.jpg)
QUESTIONS?THANK YOU!