Zabbix Integration Guide

This integration guide explains how to configure Zabbix to send alerts to AlertAgility.

  1. First create a new Zabbix alert service in your AlertAgility account, and note the Serice Key. The service key will be used later in Zabbix UI to point to the right service in AlertAgility. create new Zabbix service

  2. Download and install AlertAgility Zabbix plugin scripts from https://github.com/AlertAgility/alertagility-zabbix

        sudo git clone https://github.com/AlertAgility/alertagility-zabbix
        
    

  3. Copy the files into Zabbix plugin configuration directory. This will typically be /etc/zabbix/alerts.d/

        go into  alertagility-zabbix/ directory and
        sudo cp alertagility.py /etc/zabbix/alert.d/alertagility.py
        
    

  4. Open the ‘/etc/zabbix/alert.d/alertagility.py’ file and configure the ‘URL’ variable to point to your AlertAgility subdomain. This will be of the form https://got.alertagility.com/api/new_event where got is your subdomain. Restart zabbix-server.

  5. On your Zabbix UI, go to Administration -> Media Types and Create a new media. crete new media 1

  6. In media type configuration, select Script, give it a name, and on Script name enusre you have alertagility.py. Then save the media type. Once saved it should become available under media types list. crete new media 2

  7. Next, go to Administration -> Users and on the right hand corner dropdown select Users and hit Create User. Here, we will create a user called AlertAgility to be used for all notification. crete new user

  8. User configuration has 3 parts. User, Media and Permissions. On Users tab, give it appropriate names. Then go to Permissions tab and allow it permissions as fits your requirements. crete new user 2

  9. Next, go to Media tab, and click on teh Add button. In the new window choose AlertAgility as your type and, under “send to” put the Zabbix service key from step 1. This key needs to match your Zabbix service key in order to you to authenticate with AlertAgility service. Once done click Save. crete new user 3

  10. So far you have created the plugin/media to be used to send notification to Alertagility. Then created a user to use that media type when an alert happens, but have not configured any alert to use this user/plugin yet. Next, lets create an action to use this user.

  11. On your Zabbix UI, go to Configuration -> Actions and click on Create Action. crete new media

  12. Under Actions, there are 3 sections to configure. First under Action use the following values for the fields as shown on the picture below.

    Name: AlertAgility
        
    Default Subject: Triggered
        
    Default Message:
        
    name:{TRIGGER.NAME}
    id:{TRIGGER.ID}
    status:{TRIGGER.STATUS}
    hostname:{HOSTNAME}
    ip:{IPADDRESS}
    value:{TRIGGER.VALUE}
    event_id:{EVENT.ID}
    severity:{TRIGGER.SEVERITY}
        
    Click on Recovery Message  use the following fields
        
    Default Subject: Resolved
        
    Default Message:
        
    name:{TRIGGER.NAME}
    id:{TRIGGER.ID}
    status:{TRIGGER.STATUS}
    hostname:{HOSTNAME}
    ip:{IPADDRESS}
    value:{TRIGGER.VALUE}
    event_id:{EVENT.ID}
    severity:{TRIGGER.SEVERITY}
    

    crete new action

  13. Next, under Condition tabs add both Problem and OK conditions. crete new action

  14. Under Operations tab, on “Send to Users” section click add and choose AlertAgility user that you created before. Also, ensure “Send Only to” is selected to AlertAgility. crete new action

  15. Once done, click save. crete new media

At this point Zabbix server should notify your AlertAgility account every time a new incident is created or resolved. If you are experience problems, check the Actions section of your alert to see that zabbix is succesfully calling the script.

Troubleshooting

Feel free to send us an email support@alertagility.com if you need help or jump into IRC or Slack #alertagility.