Zabbix

Send events to Squadcast from Zabbix

This document will help you integrate Zabbix with Squadcast.

Zabbix is a mature, enterprise-level platform that allows you to monitor large-scale IT environments comprising servers, networks, applications and services. Route detailed monitoring alerts from Zabbix to the right users in Squadcast.

How to integrate Zabbix with Squadcast

In Squadcast: Using Zabbix as an Alert Source

(1) From the navigation bar on the left, select Services. Pick the applicable Team from the Team-picker on the top. Next, click on Alert Sources for the applicable Service

(2) Search for Zabbix from the Alert Source drop-down and copy the Webhook URL

In Zabbix: Create a Squadcast Webhook

(1) Navigate to Zabbix’s AlertScriptsPath directory. This is usually /etc/zabbix/alert.d or /usr/local/share/zabbix/alertscripts. Check your zabbix_server.conf file to see how this option is configured.

(2) In this directory, run the following command:

sudo wget https://raw.githubusercontent.com/squadcastHub/squadcast-zabbix-script/master/sq-zabbix.py

Once the file is downloaded, ensure that it has executable permissions for your Zabbix user. If not then please provide the same using the following command:

chmod +x sq-zabbix.py

(3) Head over to the Administration tab and then click on Media types. Click on Create Media type to create a new Media Type with the following configuration

Name: Squadcast 
AlertType: Script
Script Name: sq-zabbix.py
Script Parameters:
    {ALERT.SENDTO}
    {ALERT.SUBJECT}
    {ALERT.MESSAGE}

Additionally, ensure Enabled checkbox is selected and then click on Add

(4) Now you can add this Media Type to any User/s of Zabbix. To do so, navigate to Administration tab and select Users from the drop-down. Here, select Media tab and click on Add

  • Type: Either pick Squadcast or add a name, such as Squadcast
  • Send to: Paste the copied Zabbix Webhook URL from Squadcast
  • When active: Specify suitable values
  • Use if severity: Select appropriate checkboxes
  • Click on Add to save the Media for the User

(5) Make sure you click on Update button in the Media page to save these details

(6) Navigate to the Configuration tab and click on Actions. Click on Create Action and enter a meaningful name, such as Squadcast Notifications

(7) Switch to Operations” tab on the same page and configure the parameters as per your requirements

Copy-paste the following in the ‘Default Message’ field:

name:{TRIGGER.NAME}
id:{TRIGGER.ID}
status:{TRIGGER.STATUS}
hostname:{HOSTNAME}
ip:{IPADDRESS}
value:{TRIGGER.VALUE}
event_id:{EVENT.ID}
severity:{TRIGGER.SEVERITY}
url:{TRIGGER.URL}

(8) Similarly, switch to Recovery operations tab and configure the following: Copy-paste the following in the ‘Default Message’ field:

name:{TRIGGER.NAME}
id:{TRIGGER.ID}
status:{TRIGGER.STATUS}
hostname:{HOSTNAME}
ip:{IPADDRESS}
value:{TRIGGER.VALUE}
event_id:{EVENT.ID}
severity:{TRIGGER.SEVERITY}
url:{TRIGGER.URL}

(9) Finally click on Add to save Squadcast Notifications

That’s it, our Zabbix integration is now good to go! Whenever Zabbix fires an alert, an incident is created in Squadcast for the same.

How-to: Zabbix Integration

 
Ready to try Squadcast?
Start Now For Free! Schedule a Demo