ZABBIX 2.4 – 11 External checks

Please Like Us!!!

11 External checks

11.1 Overview

External check is a check executed by Zabbix server by running a shell script or a binary.

External checks do not require any agent running on a host being monitored.

The syntax of the item key is:

script[<parameter1>,<parameter2>,...]

Where:

ARGUMENT DEFINITION
script Name of a shell script or a binary.
parameter(s) Optional command line parameters.

If you don't want to pass any parameters to the script you may use:

script[] or
script

Zabbix server will look in the directory defined as the location for external scripts (parameter 'ExternalScripts' in Zabbix Server configuration file) and execute the command. The command will be executed as the user Zabbix server runs as, so any access permissions or environment variables should be handled in a wrapper script, if necessary, and permissions on the command should allow that user to execute it. Only commands in the specified directory are available for execution.

Zabbix uses the standard output of the script as the value (the full output with trimmed trailing whitespace is returned since Zabbix 2.0). Standard error and exit codes are discarded.

Do not overuse external checks! It can decrease performance of the Zabbix system a lot.

11.2 Usage example

Executing the script check_oracle.sh with parameters ”-h <host IP address>”.

check_oracle.sh["-h","{HOST.CONN}"]

Zabbix will execute:

check_oracle.sh "-h" "192.168.1.4"

Data source: Zabbix

Reviews & Comments

Enjoy!