This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

2 Operations

Overview

You can define the following operations for all events:

  • send a message
  • execute a remote command (including IPMI)

For discovery events, there are additional operations available:

  • add host
  • remove host
  • enable host
  • disable host
  • add to group
  • delete from group
  • link to template
  • unlink from template
  • set host inventory mode

The additional operations available for auto-registration events are:

  • add host
  • disable host
  • add to group
  • link to template
  • set host inventory mode

Configuring an operation

To configure an operation, go to the Operations tab in action configuration and click on New in the Operations block. Edit the operation step and click on Add to add to the list of Operations.

Operation attributes:

Parameter Description
Default operation step duration Duration of one operation step by default (minimum 60 seconds).
For example, an hour-long step duration means that if an operation is carried out, an hour will pass before the next step.
Default subject Default message subject for notifications. The subject may contain macros. It is limited to 255 characters.
Default message Default message for notifications. The message may contain macros. It is limited to certain amount of characters depending on the type of database (see Sending message for more information).
Pause operations while in maintenance Mark this checkbox to delay the start of operations for the duration of a maintenance period. When operations are started, after the maintenance, all operations are performed including those for the events during the maintenance.
If you unmark this checkbox, operations will be executed without delay even during a maintenance period.
This option is supported since Zabbix 3.2.0.
Operations Action operations are displayed, with these details:
Steps - escalation step(s) to which the operation is assigned
Details - type of operation and its recipient/target.
Since Zabbix 2.2, the operation list also displays the media type (e-mail, SMS, Jabber, etc) used in sending a message as well as the name and surname (in parentheses after the alias) of a notification recipient.
Start in - how long after an event the operation is performed
Duration (sec) - step duration is displayed. Default is displayed if the step uses default duration, and a time is displayed if custom duration is used.
Action - links for editing and removing an operation are displayed.
To configure a new operation, click on New.
Operation details This block is used to configure the details of an operation.
Steps Select the step(s) to assign the operation to in an escalation schedule:
From - execute starting with this step
To - execute until this step (0=infinity, execution will not be limited)
Step duration Custom duration for these steps (0=use default step duration).
Several operations can be assigned to the same step. If these operations have different step duration defined, the shortest one is taken into account and applied to the step.
Operation type Two operation types are available for all events:
Send message - send message to user
Remote command - execute a remote command
More operations are available for discovery and auto-registration based events (see above).
Operation type: send message
Send to user groups Click on Add to select user groups to send the message to.
The user group must have at least "read" permissions to the host in order to be notified.
Send to users Click on Add to select users to send the message to.
The user must have at least "read" permissions to the host in order to be notified.
Send only to Send message to all defined media types or a selected one only.
Default message If selected, the default message will be used (see above).
Subject Subject of the custom message. The subject may contain macros. It is limited to 255 characters.
Message The custom message. The message may contain macros. It is limited to certain amount of characters depending on the type of database (see Sending message for more information).
Operation type: remote command
Target list Select targets to execute the command on:
Current host - command is executed on the host of the trigger that caused the problem event. This option will not work if there are multiple hosts in the trigger.
Host - select host(s) to execute the command on.
Host group - select host group(s) to execute the command on. Starting with Zabbix 3.2.2, specifying a parent host group implicitly selects all nested host groups. Thus the remote command will also be executed on hosts from nested groups.
A command on a host is executed only once, even if the host matches more than once (e.g. from several host groups; individually and from a host group).
The target list is meaningless if a custom script is executed on Zabbix server. Selecting more targets in this case only results in the script being executed on the server more times.
Note that for global scripts, the target selection also depends on the Host group setting in global script configuration.
Type Select the command type:
IPMI - execute an IPMI command
Custom script - execute a custom set of commands
SSH - execute an SSH command
Telnet - execute a Telnet command
Global script - execute one of the global scripts defined in Administration→Scripts.
Execute on Execute a custom script on Zabbix server or Zabbix agent. To execute scripts on the agent, it must be configured to allow remote commands from the server.
This field is available if 'Custom script' is selected as Type.
Commands Enter the command(s).
Supported macros will be resolved based on the trigger expression that caused the event. For example, host macros will resolve to the hosts of the trigger expression (and not of the target list).
Conditions Condition for performing the operation:
Not ack - only when the event is unacknowledged
Ack - only when the event is acknowledged.