An action is executed only in case an event matches a defined set of conditions. Conditions are set when configuring an action.
The following conditions can be set for trigger-based actions:
Condition type | Supported operators | Description |
---|---|---|
Application | = like not like |
Specify an application or an application to exclude. = - event belongs to a trigger of the item that is linked to the specified application. like - event belongs to a trigger of the item that is linked to an application containing the string. not like - event belongs to a trigger of the item that is linked to an application not containing the string. |
Host group | = <> |
Specify host groups or host groups to exclude. = - event belongs to this host group. <> - event does not belong to this host group. Specifying a parent host group implicitly selects all nested host groups. To specify the parent group only, all nested groups have to be additionally set with the <> operator. |
Template | = <> |
Specify templates or templates to exclude. = - event belongs to a trigger inherited from this template. <> - event does not belong to a trigger inherited from this template. |
Host | = <> |
Specify hosts or hosts to exclude. = - event belongs to this host. <> - event does not belong to this host. |
Tag | = <> like not like |
Specify event tag or event tag to exclude. = - event has this tag <> - event does not have this tag like - event has a tag containing this string not like - event does not have a tag containing this string |
Tag value | = <> like not like |
Specify event tag and value combination or tag and value combination to exclude. = - event has this tag and value <> - event does not have this tag and value like - event has a tag and value containing these strings not like - event does not have a tag and value containing these strings |
Trigger | = <> |
Specify triggers or triggers to exclude. = - event is generated by this trigger. <> - event is generated by any other trigger, except this one. |
Trigger name | like not like |
Specify a string in the trigger name or a string to exclude. like - event is generated by a trigger, containing this string in the name. Case sensitive. not like - this string cannot be found in the trigger name. Case sensitive. Note: Entered value will be compared to trigger name with all macros expanded. |
Trigger severity | = <> >= <= |
Specify trigger severity. = - equal to trigger severity <> - not equal to trigger severity >= - more or equal to trigger severity <= - less or equal to trigger severity |
Time period | in not in |
Specify a time period or a time period to exclude. in - event time is within the time period. not in - event time is not within the time period. See the time period specification page for description of the format. User macros are supported, since Zabbix 3.4.0. |
Maintenance status | in not in |
Specify a host in maintenance or not in maintenance. in - host is in maintenance mode. not in - host is not in maintenance mode. Note: If several hosts are involved in the trigger expression, the condition matches if at least one of the hosts is/is not in maintenance mode. |
When a new action for triggers is created, it gets one condition automatically: "Maintenance status = not in maintenance". With this condition notifications are not sent for hosts in maintenance. This condition can be removed by the user.
The following conditions can be set for discovery-based events:
Condition type | Supported operators | Description |
---|---|---|
Host IP | = <> |
Specify an IP address range or a range to exclude for a discovered host. = - host IP is in the range. <> - host IP is not in the range. It may have the following formats: Single IP: 192.168.1.33 Range of IP addresses: 192.168.1-10.1-254 IP mask: 192.168.4.0/24 List: 192.168.1.1-254, 192.168.2.1-100, 192.168.2.200, 192.168.4.0/24 Support for spaces in the list format is provided since Zabbix 3.0.0. |
Service type | = <> |
Specify a service type of a discovered service or a service type to exclude. = - matches the discovered service. <> - does not match the discovered service. Available service types: SSH, LDAP, SMTP, FTP, HTTP, HTTPS (available since Zabbix 2.2 version), POP, NNTP, IMAP, TCP, Zabbix agent, SNMPv1 agent, SNMPv2 agent, SNMPv3 agent, ICMP ping, telnet (available since Zabbix 2.2 version). |
Service port | = <> |
Specify a TCP port range of a discovered service or a range to exclude. = - service port is in the range. <> - service port is not in the range. |
Discovery rule | = <> |
Specify a discovery rule or a discovery rule to exclude. = - using this discovery rule. <> - using any other discovery rule, except this one. |
Discovery check | = <> |
Specify a discovery check or a discovery check to exclude. = - using this discovery check. <> - using any other discovery check, except this one. |
Discovery object | = | Specify the discovered object. = - equal to discovered object (a device or a service). |
Discovery status | = | Up - matches 'Host Up' and 'Service Up' events Down - matches 'Host Down' and 'Service Down' events Discovered - matches 'Host Discovered' and 'Service Discovered' events Lost - matches 'Host Lost' and 'Service Lost' events |
Uptime/Downtime | >= <= |
Uptime for 'Host Up' and 'Service Up' events. Downtime for 'Host Down' and 'Service Down' events. >= - is more or equal to. Parameter is given in seconds. <= - is less or equal to. Parameter is given in seconds. |
Received value | = <> >= <= like not like |
Specify the value received from an agent (Zabbix, SNMP) check in a discovery rule. Case sensitive string comparison. If several Zabbix agent or SNMP checks are configured for a rule, received values for each of them are checked (each check generates a new event which is matched against all conditions). = - equal to the value. <> - not equal to the value. >= - more or equal to the value. <= - less or equal to the value. like - contains the substring. Parameter is given as a string. not like - does not contain the substring. Parameter is given as a string. |
Proxy | = <> |
Specify a proxy or a proxy to exclude. = - using this proxy. <> - using any other proxy except this one. |
Service checks in a discovery rule, which result in discovery events, do not take place simultaneously. Therefore, if multiple values are configured for Service type
, Service port
or Received value
conditions in the action, they will be compared to one discovery event at a time, but not to several events simultaneously. As a result, actions with multiple values for the same check types may not be executed correctly.
The following conditions can be set for actions based on active agent auto-registration:
Condition type | Supported operators | Description |
---|---|---|
Host metadata | like not like |
Specify host metadata or host metadata to exclude. like - host metadata contains the string. not like - host metadata does not contain the string. Host metadata can be specified in an agent configuration file. |
Host name | like not like |
Specify a host name or a host name to exclude. like - host name contains the string. not like - host name does not contain the string. |
Proxy | = <> |
Specify a proxy or a proxy to exclude. = - using this proxy. <> - using any other proxy except this one. |
The following conditions can be set for actions based on internal events:
Condition type | Supported operators | Description |
---|---|---|
Application | = like not like |
Specify an application or an application to exclude. = - event belongs to an item that is linked to the specified application. like - event belongs to an item that is linked to an application containing the string. not like - event belongs to an item that is linked to an application not containing the string. |
Event type | = | Item in "not supported" state - matches events where an item goes from a 'normal' to 'not supported' state Low-level discovery rule in "not supported" state - matches events where a low-level discovery rule goes from a 'normal' to 'not supported' state Trigger in "unknown" state - matches events where a trigger goes from a 'normal' to 'unknown' state |
Host group | = <> |
Specify host groups or host groups to exclude. = - event belongs to this host group. <> - event does not belong to this host group. |
Template | = <> |
Specify templates or templates to exclude. = - event belongs to an item/trigger/low-level discovery rule inherited from this template. <> - event does not belong to an item/trigger/low-level discovery rule inherited from this template. |
Host | = <> |
Specify hosts or hosts to exclude. = - event belongs to this host. <> - event does not belong to this host. |
The following options of calculating conditions are available:
Note that using "And" calculation is disallowed between several triggers when they are selected as a Trigger=
condition. Actions can only be executed based on the event of one trigger.
Host group = Oracle servers
Host group = MySQL servers
Trigger name like 'Database is down'
Trigger name like 'Database is unavailable'
is evaluated as
(Host group = Oracle servers or Host group = MySQL servers) and (Trigger name like 'Database is down' or Trigger name like 'Database is unavailable')
While the previous example with And/Or
would be represented as (A or B) and (C or D), in a custom expression you may as well have multiple other ways of calculation:
(A and B) and (C or D)
(A and B) or (C and D)
((A or B) and C) or D
(not (A or B) and C) or not D
etc.
If a certain object (host, template, trigger, etc) used in an action condition/operation is deleted, the condition/operation is removed and the action is disabled to avoid incorrect execution of the action. The action can be re-enabled by the user.
This behavior takes place when deleting:
Note: If a remote command has many target hosts, and we delete one of them, only this host will be removed from the target list, the operation itself will remain. But, if it's the only host, the operation will be removed, too. The same goes for "link to template" and "unlink from template" operations.
Actions are not disabled when deleting a user or user group used in a "send message" operation.
The following conditions can be set for actions based on active agent autoregistration:
Condition type | Supported operators | Description |
---|---|---|
Host metadata | contains does not contain matches does not match |
Specify host metadata or host metadata to exclude. contains - host metadata contains the string. does not contain - host metadata does not contain the string. Host metadata can be specified in an agent configuration file. matches - host metadata matches regular expression. does not match - host metadata does not match regular expression. |
Host name | contains does not contain matches does not match |
Specify a host name or a host name to exclude. contains - host name contains the string. does not contain - host name does not contain the string. matches - host name matches regular expression. does not match - host name does not match regular expression. |
Proxy | equals does not equal |
Specify a proxy or a proxy to exclude. equals - using this proxy. does not equal - using any other proxy except this one. |
The following conditions can be set for actions based on internal events:
Condition type | Supported operators | Description |
---|---|---|
Event type | equals | Item in "not supported" state - matches events where an item goes from a 'normal' to 'not supported' state Low-level discovery rule in "not supported" state - matches events where a low-level discovery rule goes from a 'normal' to 'not supported' state Trigger in "unknown" state - matches events where a trigger goes from a 'normal' to 'unknown' state |
Host group | equals does not equal |
Specify host groups or host groups to exclude. equals - event belongs to this host group. does not equal - event does not belong to this host group. |
Tag name | equals does not equal contains does not contain |
Specify event tag or event tag to exclude. equals - event has this tag does not equal - event does not have this tag contains - event has a tag containing this string does not contain - event does not have a tag containing this string |
Tag value | equals does not equal contains does not contain |
Specify event tag and value combination or tag and value combination to exclude. equals - event has this tag and value does not equal - event does not have this tag and value contains - event has a tag and value containing these strings does not contain - event does not have a tag and value containing these strings |
Template | equals does not equal |
Specify templates or templates to exclude. equals - event belongs to an item/trigger/low-level discovery rule inherited from this template. does not equal - event does not belong to an item/trigger/low-level discovery rule inherited from this template. |
Host | equals does not equal |
Specify hosts or hosts to exclude. equals - event belongs to this host. does not equal - event does not belong to this host. |
The following options of calculating conditions are available:
Note that using "And" calculation is disallowed between several triggers when they are selected as a Trigger=
condition. Actions can only be executed based on the event of one trigger.
Host group equals Oracle servers
Host group equals MySQL servers
Trigger name contains 'Database is down'
Trigger name contains 'Database is unavailable'
is evaluated as
(Host group equals Oracle servers or Host group equals MySQL servers) and (Trigger name contains 'Database is down' or Trigger name contains 'Database is unavailable')
While the previous example with And/Or
would be represented as (A or B) and (C or D), in a custom expression you may as well have multiple other ways of calculation:
(A and B) and (C or D)
(A and B) or (C and D)
((A or B) and C) or D
(not (A or B) and C) or not D
etc.
If a certain object (host, template, trigger, etc) used in an action condition/operation is deleted, the condition/operation is removed and the action is disabled to avoid incorrect execution of the action. The action can be re-enabled by the user.
This behavior takes place when deleting:
Note: If a remote command has many target hosts, and we delete one of them, only this host will be removed from the target list, the operation itself will remain. But, if it's the only host, the operation will be removed, too. The same goes for "link to template" and "unlink from template" operations.
Actions are not disabled when deleting a user or user group used in a "send message" operation.