Media are the delivery channels used for sending notifications and alerts from Zabbix.
You can configure several media types:
Media types are configured in Alerts → Media types.
Some media types come pre-defined in the default dataset. You just need to finetune their parameters to get them working.
Gmail or Office365 users may benefit from easier media type configuration. The Email provider field in the mail media type configuration allows to select pre-configured options for Gmail and Office 365.
When selecting the Gmail/Office365 related options, it is only required to supply the sender email address/password to create a working media type.
As soon as the email address/password is supplied, Zabbix will be able to automatically fill all required settings for Gmail/Office365 media types with the actual/recommended values, i.e. SMTP server, SMTP server port, SMTP helo, and Connection security. Because of this automation, these fields are not even shown, however, it is possible to see the SMTP server and email details in the media type list (see the Details column).
Note also that:
example-com.mail.protection.outlook.comwith the real value)
To create a new media type, click on the Create media type button. A media type configuration form is opened.
Some parameters are common for all media types.
In the Media type tab the common general attributes are:
|Name||Name of the media type.|
|Type||Select the type of media.|
|Description||Enter a description.|
|Enabled||Mark the checkbox to enable the media type.|
See the individual pages of media types for media-specific parameters.
The Message templates tab allows to set default notification messages for all or some of the following event types:
To customize message templates:
Message template parameters:
|Message type||Type of an event for which the default message should be used.
Only one default message can be defined for each event type.
|Message||The default message. It is limited to certain amount of characters depending on the database type (see Sending messages for more information).
The message may contain supported macros.
In problem and problem update messages, expression macros are supported (for example,
To make changes to an existing message template: in the Actions column click on to edit the template or click on to delete the message template.
It is possible to define a custom message template for a specific action (see action operations for details). Custom messages defined in the action configuration will override default media type message template.
Defining message templates is mandatory for all media types, including webhooks or custom alert scripts that do not use default messages for notifications. For example, an action "Send message to Pushover webhook" will fail to send problem notifications, if the Problem message for the Pushover webhook is not defined.
The Options tab contains alert processing settings. The same set of options is configurable for each media type.
All media types are processed in parallel. While the maximum number of concurrent sessions is configurable per media type, the total number of alerter processes on the server can only be limited by the StartAlerters parameter. Alerts generated by one trigger are processed sequentially. So multiple notifications may be processed simultaneously only if they are generated by multiple triggers.
|Concurrent sessions||Select the number of parallel alerter sessions for the media type:
One - one session
Unlimited - unlimited number of sessions
Custom - select a custom number of sessions
Unlimited/high values mean more parallel sessions and increased capacity for sending notifications. Unlimited/high values should be used in large environments where lots of notifications may need to be sent simultaneously.
If more notifications need to be sent than there are concurrent sessions, the remaining notifications will be queued; they will not be lost.
|Attempts||Number of attempts for trying to send a notification. Up to 100 attempts can be specified; the default value is '3'. If '1' is specified Zabbix will send the notification only once and will not retry if the sending fails.|
|Attempt interval||Frequency of trying to resend a notification in case the sending failed, in seconds (0-3600). If '0' is specified, Zabbix will retry immediately.
Time suffixes are supported, e.g. 5s, 3m, 1h.
To receive notifications of a media type, a medium (email address/phone number/webhook user ID etc) for this media type must be defined in the user profile. For example, an action sending messages to user "Admin" using webhook "X" will always fail to send anything if the webhook "X" medium is not defined in the user profile.
To define user media:
User media attributes:
|Type||The drop-down list contains the names of enabled media types.
Note that when editing a medium of a disabled media type, the type will be displayed in red.
|Send to||Provide required contact information where to send messages.
For an email media type it is possible to add several addresses by clicking on below the address field. In this case, the notification will be sent to all email addresses provided. It is also possible to specify recipient name in the Send to field of the email recipient in a format 'Recipient name <[email protected]>'. Note that if a recipient name is provided, an email address should be wrapped in angle brackets (<>). UTF-8 characters in the name are supported, quoted pairs and comments are not. For example: John Abercroft <[email protected]> and [email protected] are both valid formats. Incorrect examples: John Doe [email protected], %%"Zabbix\@\<H(comment)Q\>" [email protected] %%.
|When active||You can limit the time when messages are sent, for example, set the working days only (1-5,09:00-18:00). Note that this limit is based on the user time zone. If the user time zone is changed and is different from the system time zone this limit may need to be adjusted accordingly so as not to miss important messages.
See the Time period specification page for description of the format.
|Use if severity||Mark the checkboxes of trigger severities that you want to receive notifications for.
Note that the default severity ('Not classified') must be checked if you want to receive notifications for non-trigger events.
After saving, the selected trigger severities will be displayed in the corresponding severity colors, while unselected ones will be grayed out.
|Status||Status of the user media.
Enabled - is in use.
Disabled - is not being used.