Creating external checks
To further extend Zabbix functionality, we can use our own custom scripts, which are used by Zabbix external checks. Not everything that we want to monitor will always be standard in Zabbix, although a lot is. There's always something that could be missing, and external checks are just a way to bypass some of these.
Getting ready
For this recipe, we are going to need just our Zabbix server. We can create an item on our lar-book-centos
host, which is our Zabbix server monitored host.
How to do it…
- First, let's make sure our Zabbix server configuration is set up correctly. Execute the following on the Zabbix server CLI:
cat /etc/zabbix/zabbix_server.conf | grep ExternalScripts=
- This should show us the path where we will place the script that is used by the Zabbix external check. By default, this is
/usr/lib/zabbix/ externalscripts/
, and we will create a new script calledtest_external
in this folder with the following...