Overview

    Exporting

    To export media types, do the following:

    • Go to: AdministrationMedia 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: AdministrationMedia 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.

    ElementElement propertyRequiredTypeRange1Description
    media_types-Root element for media_types.
    namexMedia type name.
    typexstring0 - EMAIL
    1 - SMS
    2 - SCRIPT
    4 - WEBHOOK
    Transport used by the media type.
    status-string0 - ENABLED (default)
    1 - DISABLED
    Whether the media type is enabled.
    max_sessions-integerPossible 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-integer1-10 (default: 3)The maximum number of attempts to send an alert.
    attempt_interval-string0-60s (default: 10s)The interval between retry attempts.

    Accepts seconds and time unit with suffix.
    description-stringMedia type description.
    message_templates-Root element for media type message templates.
    event_sourcexstring0 - TRIGGERS
    1 - DISCOVERY
    2 - AUTOREGISTRATION
    3 - INTERNAL
    Event source.
    operation_modexstring0 - PROBLEM
    1 - RECOVERY
    2 - UPDATE
    Operation mode.
    subject-stringMessage subject.
    message-Message body.
    Used only by e-mail media type
    smtp_serverxstringSMTP server.
    smtp_port-integerDefault: 25SMTP server port to connect to.
    smtp_heloxstringSMTP helo.
    smtp_emailxstringEmail address from which notifications will be sent.
    smtp_security-string0 - NONE (default)
    1 - STARTTLS
    2 - SSL_OR_TLS
    SMTP connection security level to use.
    smtp_verify_host-string0 - NO (default)
    1 - YES
    SSL verify host for SMTP. Optional if smtp_security is STARTTLS or SSL_OR_TLS.
    smtp_verify_peer-string0 - NO (default)
    1 - YES
    SSL verify peer for SMTP. Optional if smtp_security is STARTTLS or SSL_OR_TLS.
    smtp_authentication-string0 - NONE (default)
    1 - PASSWORD
    SMTP authentication method to use.
    username-stringUsername.
    password-Authentication password.
    content_type-string0 - TEXT
    1 - HTML (default)
    Message format.
    Used only by SMS media type
    gsm_modemxstringSerial device name of the GSM modem.
    Used only by script media type
    script namexstringScript name.
    parameters-Root element for script parameters.
    Used only by webhook media type
    scriptxstringScript.
    timeout-string1-60s (default: 30s)Javascript script HTTP request timeout interval.
    process_tags-string0 - NO (default)
    1 - YES
    Whether to process returned tags.
    show_event_menu-string0 - 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-stringURL of the event menu entry. Supports {EVENT.TAGS.} macro.
    event_menu_name-stringName of the event menu entry. Supports {EVENT.TAGS.*} macro.
    parameters-Root element for webhook media type parameters.
    namexWebhook parameter name.
    value-stringWebhook parameter value.
    Footnotes