2 User macros supported by location

    Overview

    Only global-level user macros are supported for Actions, Network discovery, Proxies and all locations listed under Other locations section of this page. In the mentioned locations, host-level and template-level macros will not be resolved.

    Actions

    In actions, user macros can be used in the following fields:

    Hosts/host prototypes

    In a host and configuration, user macros can be used in the following fields:

    LocationMultiple macros/mix with text1
    Interface IP/DNSDNS only
    Interface portno
    SNMP v1, v2
    SNMP communityyes
    SNMP v3
    Context nameyes
    Security nameyes
    Authentication passphraseyes
    Privacy passphraseyes
    IPMI
    Usernameyes
    Passwordyes
    Tags
    Tag namesyes
    Tag valuesyes

    Items / item prototypes

    In an or an item prototype configuration, user macros can be used in the following fields:

    LocationMultiple macros/mix with text
    Item key parametersyes
    Update intervalno
    Custom intervalsno
    History storage periodno
    Trend storage periodno
    Descriptionyes
    Calculated item
    Formulayes
    Database monitor
    Usernameyes
    Passwordyes
    SQL queryyes
    HTTP agent
    URL3yes
    Query fieldsyes
    Timeoutno
    Request bodyyes
    Headers (names and values)yes
    Required status codesyes
    HTTP proxyyes
    HTTP authentication usernameyes
    HTTP authentication passwordyes
    SSl certificate fileyes
    SSl key fileyes
    SSl key passwordyes
    Allowed hostsyes
    JMX agent
    JMX endpointyes
    Script item
    Parameter names and valuesyes
    SNMP agent
    SNMP OIDyes
    SSH agent
    Usernameyes
    Public key fileyes
    Private key fileyes
    Passwordyes
    Scriptyes
    TELNET agent
    Usernameyes
    Passwordyes
    Scriptyes
    Zabbix trapper
    Allowed hostsyes
    Tags
    Tag namesyes
    Tag valuesyes
    Preprocessing
    Step parameters (including custom scripts)yes

    Low-level discovery

    Network discovery

    In a network discovery rule, user macros can be used in the following fields:

    LocationMultiple macros/mix with text
    Update intervalno
    SNMP v1, v2
    SNMP communityyes
    SNMP OIDyes
    SNMP v3
    Context nameyes
    Security nameyes
    Authentication passphraseyes
    Privacy passphraseyes
    SNMP OIDyes

    Proxies

    In a configuration, user macros can be used in the following field:

    LocationMultiple macros/mix with text1
    Interface port (for passive proxy)no

    Templates

    In a template configuration, user macros can be used in the following fields:

    Triggers

    In a trigger configuration, user macros can be used in the following fields:

    LocationMultiple macros/mix with text
    Nameyes
    Operational datayes
    Expression (only in constants and function parameters; secret macros are not supported)yes
    Tag for matchingyes
    Menu entry nameyes
    Menu entry URL3yes
    Descriptionyes
    Tags
    Tag namesyes
    Tag valuesyes

    Web scenario

    LocationMultiple macros/mix with text
    Nameyes
    Update intervalno
    Agentyes
    HTTP proxyyes
    Variables (values only)yes
    Headers (names and values)yes
    Steps
    Nameyes
    URL3yes
    Variables (values only)yes
    Headers (names and values)yes
    Timeoutno
    Required stringyes
    Required status codesno
    Authentication
    Useryes
    Passwordyes
    SSL certificateyes
    SSL key fileyes
    SSL key passwordyes
    Tags
    Tag namesyes
    Tag valuesyes

    Other locations

    In addition to the locations listed here, user macros can be used in the following fields:

    For a complete list of all macros supported in Zabbix, see .

    Footnotes

    1 If multiple macros in a field or macros mixed with text are not supported for the location, a single macro has to fill the whole field.

    2 Macros used in tag names and values are resolved only during event generation process.