Ad Widget

Collapse

Discovery and inheritance of tags + automatically tags from discovery macros

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mcurty
    Junior Member
    • Jan 2019
    • 6

    #1

    Discovery and inheritance of tags + automatically tags from discovery macros


    Good morning

    I'm not sure this is a bug or something not designed to work, or a mistake on my side in configuration.
    "My" Zabbix is a v. 6.0.6

    I have hosts on which a template containing more than 20 discovery rules. For each of them, there are multiple items prototypes and trigger prototypes.
    I set tags on item prototypes like this : tag_Environment = {#TAG_ENVIRONMENT}
    that works well on items discovered on hosts.

    But,
    As for some of the tag that I need, they are common to lots of discovery rule, I had the idea to set a tag directly on the template itself. The tag has been written like this:
    tag_on_guard = {#TAG_ON_GUARD}
    and tag_origine = template_1

    this value {#TAG_ON_GUARD} is discovered by autodiscovery rules.

    The thing is, when I re execute the autodiscovery rule,
    the items created contains the tags defined directly on the 'item prototype' of the discovery rule, but not the ones created on the template directly.
    so.. tag_Environment was present,
    but not the tag_on_guard and tag_origine,
    well, I think there are not there because I can't see them in the column 'tags' on the right when listing 'items' on a specific host.

    I found it weird because on the item prototypes, in 'tags' section, when hitting 'inherited and item tags', I can see these two inherited prototypes - whereas they are not listed in host items.

    Is it 'normal' ?

    --

    2nd question :
    My discovery rules that are custom made scripts, return a set of discovery macros ( {#xxxx} ) - is it to automatically make them 'tags' for items ?
    For example, I scripted this behaviour : For aws resources, I automatically return for each resource all the tags containing 'monit_'. Is it possible, with 'overide' capability for example, to create as many item tags than there are 'monit' macros return by the lld rule ?

    Thanks a lot for your support,
    I have always appreciated your insights when, previously, I needed your help.
    kind regards
    Mika

  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    See the documentation for LLD macros: https://www.zabbix.com/documentation...ros/lld_macros

    You cannot use LLD macros outside of the LLD rules and prototypes.

    Markku

    Comment

    Working...