Zabbix uses common functionality for external checks, user parameters, system.run items, custom alert scripts, remote commands and global scripts.
By default, all scripts in Zabbix are executed using the sh shell, and it is not possible to modify the default shell. To utilize a different shell, you can employ a workaround: create a script file and invoke that script during command execution.
The command/script is executed similarly on both Unix and Windows platforms:
Zabbix assumes that a command/script has done processing when the initial child process has exited AND no other process is still keeping the output handle/file descriptor open. When processing is done, ALL created processes are terminated.
All double quotes and backslashes in the command are escaped with backslashes and the command is enclosed in double quotes.
Exit code are checked with the following conditions:
Possible frontend messages and log entries for failed commands/scripts: