Ad Widget

Collapse

User Macro in a Template Web Scenario Name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • klabarre
    Junior Member
    • Mar 2011
    • 6

    #1

    User Macro in a Template Web Scenario Name

    I'm finding mixed answers to whether this is supported in Zabbix 6.2. The documentation (https://www.zabbix.com/documentation...web_monitoring) does not suggest that a user macro is supported in the name field, yet the Macros Supported by Location page (https://www.zabbix.com/documentation..._location_user) shows that they are supported in the Name field for Web Scenarios. Here is my experience and problem:

    I have a template for a web scenario with the name defined as {$WEBSITE_URL_1}.
    Looking at the host where this template is assigned, under the Macros tab, I have a macro defined with: {$WEBSITE_URL_1} and a value of a URL like "https://www.example.com".
    Looking at the host where this template is assigned, I see the name as Template_Websites: {$WEBSITE_URL_1}.
    Looking at the monitoring results, under Latest Data, I see the name as Failed step of scenario "{$WEBSITE_URL_1}".

    Clearly, my macro is not resolving, so either I'm doing something wrong, which is entirely possible, or user macros are not supported for the name field, in a template, for a web scenario. I need to monitor quite a few sites so I'm trying to come up with the most streamlined way to configure this using templates.

    Does anyone have any thoughts as to what's happening here? I appreciate your response ahead of time.

    Kevin
  • markfree
    Senior Member
    • Apr 2019
    • 868

    #2
    I've tested over here and can confirm that, as the Web Monitoring documentation implies, the Name field does not support user macros. The same is true for the Step name.
    But you can still use user macros in the Step "URL" field.
    Since the Macros Supported by Location page states that the name field supports user macros, I believe that might be a documentation issue.
    Maybe you can open an issue at support.zabbix.com .

    Comment

    Working...