Enabling and disabling a host from Zabbix maps
We’ve noticed that it is not possible to enable and disable hosts as a Zabbix user. For some companies, this may be a requirement, so we’ve created an extension for it. In this recipe, I will show you just how to work with this Python script and execute it from a map.
Getting ready
For this recipe, all we are going to need is our Zabbix server, some knowledge of Python, and some knowledge of the Zabbix API.
How to do it…
- First, let’s log in to our Zabbix server CLI and create a new directory:
mkdir /etc/zabbix/frontendscripts
- Change to the new directory:
cd /etc/zabbix/frontendscripts
- Now, download the public script from the Opensource ICT Solutions GitHub:
wget https://github.com/OpensourceICTSolutions/zabbix-toggle-hosts-from-frontend/archive/v2.0.tar.gz
- If you can’t use
wget
from your host, you can check out the script here: https://github.com/OpensourceICTSolutions/zabbix-toggle...