Ad Widget

Collapse

LLD MACRO Getting Corrupted?

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • beanywilson
    Junior Member
    • Jun 2023
    • 6

    #1

    LLD MACRO Getting Corrupted?

    Hi All

    My first post so please be gentle.

    Using Zabbix 6.4.7 and trialling some SNMP discovery jobs. The Discovery works fine, and the LLD MACROs get created, but if I try and use it in a calculated item prototype, it appears that one of the created MACROs gets corrupted.

    The Discovery Job Looks like this for the PBX I am looking at.


    discovery[{#STATIONEXT}, 1.3.6.1.4.1.6889.2.73.8.1.7.1.1.2,{#STATIONTYPE}, 1.3.6.1.4.1.6889.2.73.8.1.7.1.1.3,{#STATIONPORT}, 1.3.6.1.4.1.6889.2.73.8.1.7.1.1.5,{#STATIONNAME},1 .3.6.1.4.1.6889.2.73.8.1.7.1.1.4]

    Works Perfectly

    Created an Item Prototype

    Click image for larger version

Name:	image.png
Views:	145
Size:	77.7 KB
ID:	473015

    There is no error when using it. You will notice the Macro ​{#STATIONTYPE} in the Name and the Formula When the job runs I get the following

    Click image for larger version

Name:	image.png
Views:	88
Size:	48.5 KB
ID:	473016

    The {#STATIONTYPE} in the name is correct 603E1 but in the Formula, it returns 6030 - which is incorrect.

    Any ideas?

  • Answer selected by beanywilson at 26-10-2023, 21:07.
    Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    6030 == 630*101== 630E1
    ;-)

    The main idea is to convert to a string.
    try {{#STATIONTYPE}.regsub((.*), \0)}
    Last edited by Hamardaban; 26-10-2023, 14:02.

    Comment

    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #2
      6030 == 630*101== 630E1
      ;-)

      The main idea is to convert to a string.
      try {{#STATIONTYPE}.regsub((.*), \0)}
      Last edited by Hamardaban; 26-10-2023, 14:02.

      Comment

      • beanywilson
        Junior Member
        • Jun 2023
        • 6

        #3
        Originally posted by Hamardaban
        6030 == 630*101== 630E1
        ;-)

        The main idea is to convert to a string.
        try {{#STATIONTYPE}.regsub((.*), \0)}
        Thank you - I should of realized when Excel started playing the same games with the data.

        Comment

        Working...