You can set up an integration with event management to receive notifications created by Zabbix. Zabbix is an open source monitoring solution for network monitoring and application monitoring.
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
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.
Click Download file and decompress the zabbix-cem.zip file on the Zabbix server.
Important: The downloaded file contains credential information, and need to be stored in a secure location.
Copy the zabbix-notification.sh file 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/
Run the following command to grant the execute permission.
chmod +x /usr/lib/zabbix/alertscripts/zabbix-notification.sh
chmod +x ./create-zabbix-action.sh
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
Notes: 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 below
## 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 below
## else default use zabbix server hostname
host="XXXX"
# host=$(echo `hostname -f`)
# if [ "${host}" == "" ]
# then
# host=$(echo ${HOSTNAME})
# fi
where XXXX is the host name or IP address of the API server, which you need to specify.
Save the integration in event management. To start receiving notifications from Zabbix, ensure that Enable event management from this source is set to On on IBM Cloud Pak console.
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: