Ad Widget

Collapse

How do I put the value of a user macro or LLD macro in the name of an item prototype?

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cesarsj
    Senior Member
    • Dec 2018
    • 154

    #1

    How do I put the value of a user macro or LLD macro in the name of an item prototype?

    How do I put the value of a user macro or LLD macro in the name of an item prototype?

    An item prototype collects the Access Point name. Another item prototype tells me if the same AP is online and another item tells me how many users are on the AP. I wanted to leave in the name of these last two item prototypes, the name of the AP. Example: Users connected in APNAME.
  • Answer selected by cesarsj at 24-08-2022, 18:32.
    cesarsj
    Senior Member
    • Dec 2018
    • 154

    Originally posted by cyber
    "Users connected to {#APNAME}"
    Assuming you are extracting {#APNAME} during your discovery...

    How did you get to discovery, if you have not read about how to use different macros in LLD?
    I change SNMP OID of Discovery rule from:

    discovery[{#SNMPVALUE},.1.3.6.1.4.1.25053.1.2.2.1.1.2.1.1.1

    To:

    discovery[{#SNMPVALUE},.1.3.6.1.4.1.25053.1.2.2.1.1.2.1.1.1, {#APNAME},.1.3.6.1.4.1.25053.1.2.2.1.1.2.1.1.2]

    This worked, and I didn't need to add LLD Macro, or do JsonPath.

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #2
      "Users connected to {#APNAME}"
      Assuming you are extracting {#APNAME} during your discovery...

      How did you get to discovery, if you have not read about how to use different macros in LLD?

      Comment

      • cesarsj
        Senior Member
        • Dec 2018
        • 154

        #3
        Originally posted by cyber
        "Users connected to {#APNAME}"
        Assuming you are extracting {#APNAME} during your discovery...

        How did you get to discovery, if you have not read about how to use different macros in LLD?
        I change SNMP OID of Discovery rule from:

        discovery[{#SNMPVALUE},.1.3.6.1.4.1.25053.1.2.2.1.1.2.1.1.1

        To:

        discovery[{#SNMPVALUE},.1.3.6.1.4.1.25053.1.2.2.1.1.2.1.1.1, {#APNAME},.1.3.6.1.4.1.25053.1.2.2.1.1.2.1.1.2]

        This worked, and I didn't need to add LLD Macro, or do JsonPath.

        Comment

        Working...