Configuring Zabbix as an event source

You can set up an integration with Netcool® Operations Insight® to receive notifications created by Zabbix. Zabbix is an open source monitoring solution for network monitoring and application monitoring.

Before you begin

Supported Zabbix versions are:
  • 3.0 LTS
  • 3.4
  • 4.0 LTS
The following event types are supported for this integration:
  • Host monitoring
  • Service monitoring
  • Web monitoring

About this task

Download the integration package from event management and import the scripts into your Zabbix server. Sample commands are provided for Linux® operating systems. Copy the zabbix-notification.sh notification script into the AlertScriptPath directory of your Zabbix server.

Execute the create-zabbix-action.sh script for an out-of-the-box event management integration with Zabbix.

Procedure

  1. Click Administration > Integrations with other systems.
  2. Click New integration.
  3. Go to the Zabbix tile and click Configure.
  4. Enter a name for the integration.
  5. Click Download file and decompress the zabbix-cem.zip file on the Zabbix server.
    Important: The download file contains credential information and should be stored in a secure location.
  6. Copy zabbix-notification.sh into the AlertScriptPath directory. The AlertScriptPath directory is specified within the Zabbix server configuration file zabbix_server.conf.
    Use the following command to check the AlertScriptPath directory:
    $ grep AlertScriptsPath /etc/zabbix/zabbix_server.conf
    Example return:
    "AlertScriptsPath=/usr/lib/zabbix/alertscripts"
    Use the following command to copy the zabbix-notification.sh to the AlertScriptPath directory (using the directory defined in the result of the previous command):
    $ cp zabbix-notification.sh /usr/lib/zabbix/alertscripts/
  7. Execute the create-zabbix-action.sh script to create required configuration. The script will create configuration through calling the Zabbix REST API. A new media type, user, and trigger action will be created so that Zabbix notifications can be forwarded to event management. Ensure the file is executable.
    Execute the script with --user --password --ip. If username/password are not provided, the script uses Admin/zabbix by default:
    $ ./create-zabbix-action.sh --user Admin --password zabbix --ip 10.0.0.1
    Note: The machine where you execute the script (for example the Zabbix server) must be able to connect to the Zabbix API server. Provide the FQDN or IP address of the Zabbix Web-front (API) server by --ip (mandatory). To do this, make the following edit in the zabbix-notifications.sh file:
    # Define your Zabbix front-end web server IP/FQDN
    # else default use zabbix server hostname
    host="myserver.office.com"
    #host=$(echo `hostname -f`)
    if [ "${host}" == "" ]
    then
     host=$(echo ${HOSTNAME})
    fi
    TO:
    Define your Zabbix front-end web server IP/FQDN
    else default use zabbix server hostname
    host="IP"
    #host=$(echo `hostname -f`)
    if [ "${host}" == "" ]
    then
     host=$(echo ${HOSTNAME})
    fi
  8. Save the integration in event management. To start receiving notifications from Zabbix, verify that Enable event management from this source is set to On..

What to do next

With this integration the user admin-cem is created under user group Zabbix Administrators. The host that you want to monitor must been assigned to the user group Zabbix Administrators or to user admin-cem before notifications can be sent to event management. Define the host and user/user group permissions in the Zabbix permissions tab:
  • Administration > User groups > Zabbix Administrators > Permissions
  • Administration > Users > admin-cem > Permissions