Overview
Exporting
To export media types, do the following:
Go to: Administration → Media types
Mark the checkboxes of the media types to export
Click on Export below the list
Depending on the selected format, media types are exported to a local file with a default name:
zabbix_export_mediatypes.xml - in XML export
Importing
To import media types, do the following:
Go to: Administration → Media types
Click on Import to the right
Select the import file
Click on Import
A success or failure message of the import will be displayed in the frontend.
Import rules:
Export format
Export to YAML:
Element tags
Element tag values are explained in the table below.
Element | Element property | Required | Type | Range1 | Description |
---|---|---|---|---|---|
media_types | - | Root element for media_types. | |||
name | x | Media type name. | |||
type | x | string | 0 - EMAIL 1 - SMS 2 - SCRIPT 4 - WEBHOOK | Transport used by the media type. | |
status | - | string | 0 - ENABLED (default) 1 - DISABLED | Whether the media type is enabled. | |
max_sessions | - | integer | Possible values for SMS: 1 - (default) Possible values for other media types: 0-100, 0 - unlimited | The maximum number of alerts that can be processed in parallel. | |
attempts | - | integer | 1-10 (default: 3) | The maximum number of attempts to send an alert. | |
attempt_interval | - | string | 0-60s (default: 10s) | The interval between retry attempts. Accepts seconds and time unit with suffix. | |
description | - | string | Media type description. | ||
message_templates | - | Root element for media type message templates. | |||
event_source | x | string | 0 - TRIGGERS 1 - DISCOVERY 2 - AUTOREGISTRATION 3 - INTERNAL | Event source. | |
operation_mode | x | string | 0 - PROBLEM 1 - RECOVERY 2 - UPDATE | Operation mode. | |
subject | - | string | Message subject. | ||
message | - | Message body. | |||
Used only by e-mail media type | |||||
smtp_server | x | string | SMTP server. | ||
smtp_port | - | integer | Default: 25 | SMTP server port to connect to. | |
smtp_helo | x | string | SMTP helo. | ||
smtp_email | x | string | Email address from which notifications will be sent. | ||
smtp_security | - | string | 0 - NONE (default) 1 - STARTTLS 2 - SSL_OR_TLS | SMTP connection security level to use. | |
smtp_verify_host | - | string | 0 - NO (default) 1 - YES | SSL verify host for SMTP. Optional if smtp_security is STARTTLS or SSL_OR_TLS. | |
smtp_verify_peer | - | string | 0 - NO (default) 1 - YES | SSL verify peer for SMTP. Optional if smtp_security is STARTTLS or SSL_OR_TLS. | |
smtp_authentication | - | string | 0 - NONE (default) 1 - PASSWORD | SMTP authentication method to use. | |
username | - | string | Username. | ||
password | - | Authentication password. | |||
content_type | - | string | 0 - TEXT 1 - HTML (default) | Message format. | |
Used only by SMS media type | |||||
gsm_modem | x | string | Serial device name of the GSM modem. | ||
Used only by script media type | |||||
script name | x | string | Script name. | ||
parameters | - | Root element for script parameters. | |||
Used only by webhook media type | |||||
script | x | string | Script. | ||
timeout | - | string | 1-60s (default: 30s) | Javascript script HTTP request timeout interval. | |
process_tags | - | string | 0 - NO (default) 1 - YES | Whether to process returned tags. | |
show_event_menu | - | string | 0 - NO (default) 1 - YES | If {EVENT.TAGS.} were successfully resolved in event_menu_url and event_menu_name fields, this field indicates presence of entry in the event menu. | |
event_menu_url | - | string | URL of the event menu entry. Supports {EVENT.TAGS.} macro. | ||
event_menu_name | - | string | Name of the event menu entry. Supports {EVENT.TAGS.*} macro. | ||
parameters | - | Root element for webhook media type parameters. | |||
name | x | Webhook parameter name. | |||
value | - | string | Webhook parameter value. |