This is a translation of the original English documentation page. Help us make it better.

1 Media types

Overzicht

Media zijn de leveringskanalen die worden gebruikt om meldingen en waarschuwingen van Zabbix te verzenden.

U kunt verschillende media types configureren:

Media types worden geconfigureerd in WaarschuwingenMedia types.

Sommige media types zijn al vooraf gedefinieerd in de standaard dataset. U hoeft alleen hun parameters bij te stellen om ze aan het werk te krijgen.

Geautomatiseerde Gmail/Office365 media types

Gmail- of Office365-gebruikers kunnen profiteren van een eenvoudigere configuratie van media types. Het veld E-mail provider in de configuratie van het e-mail media type maakt het mogelijk om voorgeconfigureerde opties te selecteren voor Gmail en Office 365.

Bij het selecteren van de Gmail/Office365 gerelateerde opties is het alleen nodig om het verzendende e-mailadres/wachtwoord op te geven om een werkend media type te maken.

Zodra het e-mailadres/wachtwoord is opgegeven, kan Zabbix automatisch alle vereiste instellingen voor Gmail/Office365 media types invullen met de feitelijke/aanbevolen waarden, zoals SMTP server, SMTP server poort, SMTP helo, en Verbindingsbeveiliging. Vanwege deze automatisering worden deze velden zelfs niet weergegeven, maar het is mogelijk om de SMTP server en e-mailgegevens te zien in de media type lijst (zie de kolom Details).

Merk ook op dat:

  • Het wachtwoord niet vereist is voor de relay-opties
  • Voor Office365 relay zal de domeinnaam van het opgegeven e-mailadres worden gebruikt om de SMTP server dynamisch in te vullen (bijvoorbeeld "example.com" vervangen in example-com.mail.protection.outlook.com met de werkelijke waarde)

Om te testen of een geconfigureerd media type werkt, klik op de Test link in de laatste kolom (zie media type testing voor E-mail, Webhook, of Script voor meer details).

Om een nieuw media type te maken, klik op de knop Media type aanmaken. Een formulier voor het configureren van een media type wordt geopend.

Media type testing

To test if a configured media type works, click on Test in the media type list.

The testing request will be sent to Zabbix server. Zabbix server will attempt to send an alert using the specified media type and will return the result to frontend. The frontend will wait for the server to return the results. Media type testing has a 65-second timeout by default (configurable in Administration > General > Timeouts).

See also testing details for:

Configuration

To create a media type in Zabbix frontend:

  • Go to: Alerts > Media types
  • Click on Create media type
  • Enter parameters of the media type in the form

Some parameters are common for all delivery methods.

Parameter Description
Name Name of the media type.
Type Select the delivery method for the media type.
Description Enter a description for the media type.
Enabled Mark the checkbox to enable the media type.

For method-specific parameters, see email, SMS, custom alertscript, or webhook pages.

Message templates

The Message templates tab contains default messages per event type (problem, problem recovery, discovery, etc).

Click on Add to define a default message (or Edit to update an existing message):

Parameter Description
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.
Subject Subject of the default message. The subject may contain macros. It is limited to 255 characters.
Subject is not available for SMS media 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, {?avg(/host/key,1h)}).

Note that default messages are overridden by custom messages, if defined in action operations.

Defining message templates is mandatory for all delivery methods, including webhooks or custom alert scripts that do not use default messages for notifications. For example, the action "Send message to Pushover webhook" will fail to send problem notifications, if the problem message for the Pushover webhook is not defined.

Options

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.

Parameter Description
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.

Gebruikersmedia

Om meldingen van een media type te ontvangen, moet er een medium (e-mailadres/telefoonnummer/webhook gebruikers-ID, enz.) voor dit media type worden gedefinieerd in het gebruikersprofiel. Bijvoorbeeld, een actie die berichten naar de gebruiker "Admin" stuurt via webhook "X" zal altijd mislukken om iets te verzenden als het medium webhook "X" niet is gedefinieerd in het gebruikersprofiel.

Om gebruikersmedia te definiëren:

  • Ga naar uw gebruikersprofiel, of ga naar Gebruikers → Gebruikers en open het formulier voor gebruikerseigenschappen.
  • In het tabblad Media, klik op

Attributen van gebruikersmedia:

Parameter Beschrijving
Type De keuzelijst bevat de namen van ingeschakelde media types.
Merk op dat bij het bewerken van een medium van een uitgeschakeld media type, het type in het rood wordt weergegeven.
Verzenden naar Geef de vereiste contactinformatie op waar berichten naartoe moeten worden verzonden.

Voor een e-mail media type is het mogelijk om meerdere adressen toe te voegen door te klikken op onder het adresveld. In dit geval wordt de melding naar alle opgegeven e-mailadressen verzonden. Het is ook mogelijk om de naam van de ontvanger op te geven in het Verzenden naar veld van de e-mail ontvanger in het formaat 'Ontvanger naam <[email protected]>'. Let op, als een ontvangersnaam wordt opgegeven, moet een e-mailadres worden ingesloten in hoekige haken (<>). UTF-8 tekens in de naam worden ondersteund, geciteerde paren en opmerkingen niet. Bijvoorbeeld: John Abercroft <[email protected]> en [email protected] zijn beide geldige formaten. Onjuiste voorbeelden: John Doe [email protected], %%"Zabbix\@\<H(opmerking)Q\>" %%.
Indien actief U kunt de tijd beperken waarop berichten worden verzonden, bijvoorbeeld alleen werkdagen instellen (1-5,09:00-18:00). Merk op dat deze limiet is gebaseerd op de gebruiker tijdzone. Als de tijdzone van de gebruiker wordt gewijzigd en verschilt van de systeemtijdzone, moet deze limiet mogelijk dienovereenkomstig worden aangepast om belangrijke berichten niet te missen.
Zie de Specificatie van tijdsperiode pagina voor een beschrijving van het formaat.
Gebruik indien ernst Markeer de selectievakjes van trigger ernstniveaus waarvoor u meldingen wilt ontvangen.
Let op dat het standaard ernstniveau ('Niet geclassificeerd') moet worden aangevinkt als u meldingen wilt ontvangen voor niet-trigger gebeurtenissen.
Na opslaan worden de geselecteerde trigger ernstniveaus weergegeven in de overeenkomstige ernstkleuren, terwijl niet-geselecteerde niveaus grijs worden weergegeven.
Status Status van de gebruikersmedia.
Ingeschakeld - wordt gebruikt.
Uitgeschakeld - wordt niet gebruikt.

Automated Gmail/Office365 media types

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:

  • The password is not required for the relay options.
  • For Office365 relay, the domain name of the provided email address will be used to dynamically fill the SMTP server (i.e., replace "example.com" in example-com.mail.protection.outlook.com with the real value).