Announcement

Collapse
No announcement yet.

User Macro to Display Item Value on Map

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    User Macro to Display Item Value on Map

    I've been through the forums, the wiki, the documentation and the book "Zabbix 1.8 Network Monitoring" and havent found anything definitive as to whether what I want to do is possible, or how to go about it.

    Essentially; I am receiving data from some environmental monitoring devices (temperature probes and whatnot) and zabbix (v1.8.5) is recording and graphing this information just fine.
    I want to build a graphical view of my comms room and display the current values for each of the temperature probes on a Map.

    I presumed that the way to go about this would be to build a User Macro that referenced the current value of the SNMP item which was associated with each probe. Theoretically this macro would then be used in the label on an icon on my Map to display the current temperature.

    I haven't been able to make this work, and I cant work out if I am going about it the wrong way or if it just wont work with this version of Zabbix (1.8.5)
    • According to the bug tracker, it should now work (was a bug fixed in 1.8.5) https://support.zabbix.com/browse/ZBX-3562
    • According to the 1.8 documentation (http://www.zabbix.com/documentation/...os#user_macros ) it /might/ work (Says that user macros are supported in item descriptions, but the matrix does not show a cross in works for Map labels)
    • and According to Rihards book in the section on p245 for Macros in labels on Maps he says "another use could be the display of live data. For example, showing the number of currently connected users for each wireless hotspot"
      - he doesn't go into any detail on the specifics of how however...



    Can someone confirm if this is indeed possible, and if so could you help walk me through setting up the User Macro correctly to retrieve the right value, and then how to get the User Macro to display on the Map icon label.

    Thanks for any help.
    McMonte

    #2
    Originally posted by McMonte View Post
    I've been through the forums, the wiki, the documentation and the book "Zabbix 1.8 Network Monitoring" and havent found anything definitive as to whether what I want to do is possible, or how to go about it.

    Essentially; I am receiving data from some environmental monitoring devices (temperature probes and whatnot) and zabbix (v1.8.5) is recording and graphing this information just fine.
    I want to build a graphical view of my comms room and display the current values for each of the temperature probes on a Map.

    I presumed that the way to go about this would be to build a User Macro that referenced the current value of the SNMP item which was associated with each probe. Theoretically this macro would then be used in the label on an icon on my Map to display the current temperature.

    I haven't been able to make this work, and I cant work out if I am going about it the wrong way or if it just wont work with this version of Zabbix (1.8.5)
    • According to the bug tracker, it should now work (was a bug fixed in 1.8.5) https://support.zabbix.com/browse/ZBX-3562
    • According to the 1.8 documentation (http://www.zabbix.com/documentation/...os#user_macros ) it /might/ work (Says that user macros are supported in item descriptions, but the matrix does not show a cross in works for Map labels)
    • and According to Rihards book in the section on p245 for Macros in labels on Maps he says "another use could be the display of live data. For example, showing the number of currently connected users for each wireless hotspot"
      - he doesn't go into any detail on the specifics of how however...



    Can someone confirm if this is indeed possible, and if so could you help walk me through setting up the User Macro correctly to retrieve the right value, and then how to get the User Macro to display on the Map icon label.

    Thanks for any help.
    McMonte
    Use like this:
    {<HOSTNAME>:<itemkey>.last(0)} like as show in trigger expression

    Comment


      #3
      Resolved

      Thanks Andre! - now working fine.

      To clarify in further detail for anyone else interested;
      My initial assumption was incorrect - You do not need a User Macro on your host to get item specific data onto your map.

      I had my host named "Enviromux"
      The item key I wanted was called "Temp1"

      I setup a new Map with the Icon Label type set to 'Label'
      Added a new icon
      Set the Icon type to "Host"
      In the Label field typed " {Enviromux:Temp1.last(0)} "

      The current temperature now appearing on my map!

      Regards,
      McMonte

      Comment


        #4
        Would be nice to have something similar in graphs. I would have love to put {Template_SNMPv2_4548GT:ifDescr1.last(0)} in the name along with graphing ifInOctets1 and ifOutOctets1.

        Comment


          #5
          Would be nice to have something similar in graphs. I would have love to put in the name along with graphing ifInOctets1 and ifOutOctets1.

          Comment


            #6
            Nice one, McMonte! Works a treat!

            Comment


              #7
              Originally posted by xibbaz View Post
              Would be nice to have something similar in graphs. I would have love to put {Template_SNMPv2_4548GT:ifDescr1.last(0)} in the name along with graphing ifInOctets1 and ifOutOctets1.
              looking for this exact thing

              Comment

              Working...
              X