[comment]: # ({516fc141-0ee06d3b})
# 7 External check

[comment]: # ({/516fc141-0ee06d3b})

[comment]: # ({6f06c618-cd36d798})
#### Overview

An external check is a check executed by Zabbix server by [running a shell
script](/manual/appendix/command_execution) or a binary. However, when
hosts are monitored by a Zabbix proxy, the external checks are executed
by the proxy.

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 or proxy will search the directory specified for external scripts and execute the command (see `ExternalScripts` parameter in Zabbix [server](/manual/concepts/server/server_params#externalscripts)/[proxy](/manual/concepts/proxy/proxy_params#externalscripts) configuration file).
The command will be executed under the same user as Zabbix server/proxy, so any access permissions or environment variables should be handled in a wrapper script, if necessary.
Permissions on the command should also allow that user to execute it.
Only commands in the specified directory are available for execution.

::: notewarning
Do not overuse external checks, as each script requires starting a fork process by Zabbix server/proxy, and running many scripts can significantly decrease Zabbix performance.
:::

[comment]: # ({/6f06c618-cd36d798})

[comment]: # ({f582cbf0-55e878ce})
#### Usage example

Executing the script **check\_oracle.sh** with the first parameters
'-h'. The second parameter will be replaced by IP address or DNS name,
depending on the selection in the host properties.

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

Assuming host is configured to use IP address, Zabbix server/proxy will execute:

    check_oracle.sh '-h' '192.168.1.4'

[comment]: # ({/f582cbf0-55e878ce})

[comment]: # ({982a4393-011b7534})
#### External check result

The return value of an external check is a standard output together with a standard error produced by the check.

::: noteimportant
An item that returns text (character, log, or text type of information) will not become unsupported in case of a standard error output.
:::

The return value is limited to 16MB (including trailing whitespace that is truncated); [database limits](/manual/config/items/item#item-data-limits) also apply.

If the requested script is not found or Zabbix server/proxy has no permissions to execute it, the item will become unsupported and a corresponding error message will be displayed.

In case of a timeout, the item will become unsupported, a corresponding error message will be displayed, and the process forked for the script will be terminated.

[comment]: # ({/982a4393-011b7534})
