Product / Documentation / Tutorials /   
Tutorials
* Extending ZABBIX agent
* Monitoring of log files
* Remote actions
Remote actions

This tutorial provides step-by-step instructions how to setup remote execution of pre-defined commands in case on an event. It is assumed that ZABBIX is configured and operational.

Step 1. Configure new action.

Follow standard instructions in order to configure actions. and configure agent on monitored host.

Pay attention to the following parameters of the action:

ParameterDescription
Action typeMust be set to Remote command
Remote commandEach line must contain an command for remote execution. For example: host:/etc/init.d/apache restart Make sure that corresponding agent has EnableRemoteCommands set to 1 in zabbix_agentd.conf

Syntax of remote commands

Remote commandDescription
<host>:<command>Command command will be executed on host host
<group>#<command>Command command will be executed on all hosts of host group group

Important notes

  • Make sure that user 'zabbix' has execute permissions for configured commands. One may be interested in using sudo to give access to priviledged commands.
  • ZABBIX agent executes commands in background
  • ZABBIX does not check if a command has been executed successfully