Remote commands is a powerful mechanism for smart pro-active monitoring. Zabbix can execute a command on a monitored host in case of any pre-defined conditions.
Here is the list of some of the most obvious uses of the feature:
Configuration of action for remote commands is similar to messaging, the only difference is that Zabbix will execute a command instead of sending a message.
The action condition is defined so that it will be activated in case of any disaster problems with one of Apache applications.
As a reaction to the disaster problem Zabbix will try to restart Apache process:
Note use of the macro {HOSTNAME} here.
User 'zabbix' must have enough permissions to execute this script. Also Zabbix agent should run on a remote host and accept incoming connections. Remote commands are disabled by default and can be enabled in Zabbix agent daemon configuration file on Unix-like or Windows systems.
Remote commands do not work with active Zabbix agents.
See remote command tutorial for more information.