Ad Widget

Collapse

Can't access to item value with macros

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dominiksmartnet
    Junior Member
    • May 2024
    • 3

    #1

    Can't access to item value with macros

    Hello, first of all i have to say im new in zabbix and other infrastructure monitoring services.

    Right now im trying now to make map with my hosts and some data.

    There is a problem, simply macros like {HOST.HOST} or {HOST.IP} are okay but i cant take item value like {HOST.HOST:system.cpu.load[all,avg5].last(0)}.
    I already tried few more ways and sematics like {{HOST.HOST}:system.cpu.load[all,avg5].last(0)} but it is never changing in to values. I checked also that i have item key "system.cpu.load[all,avg5]" and it is collecting data.

    Please help, I'm losing my mind.
  • rich@974
    Junior Member
    • Oct 2024
    • 13

    #2
    Did you get your mind back ?
    Did you getit to work ?

    Comment

    • kyus
      Senior Member
      • Feb 2024
      • 171

      #3
      The syntax was different in older releases, but for 6.0 and newer you should use the following expression macro:

      {?last(/host/system.cpu.load[all,avg5])}

      Here's some documentation about it:


      Comment

      • rich@974
        Junior Member
        • Oct 2024
        • 13

        #4
        THANK YOU !!! I used
        Code:
        {?last(/{HOST.HOST}/system.cpu.load[all,avg5])}
        and NOW it works !

        Comment

        Working...