Ad Widget

Collapse

Template: using Items in Formula (adressing issue)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bernd Hohmann
    Member
    • Mar 2013
    • 46

    #1

    Template: using Items in Formula (adressing issue)

    I have a Template "TPL Network Interface" with an Item "ITM Inbound bps" like

    Name: ITM Inbound bps
    Key: net.if.in[{$IF.NAME}]

    I stuffed this item into a graph and everything looks fine.

    Now I like to create another item which calculates the average for "ITM Inbound bps" over the last {$IF.AVERAGE} seconds to use it in a trigger and in a graph.

    The item for this reads:

    Host: TPL Network Interface
    Name: ITM Average Inbound
    Type: Calculated
    Key: ifavgin
    Formula: avg("TPL Network Interface:ITM Inbound bps",{$IF.AVERAGE})

    But no data is returned from this item.

    What is the correct adressing in the namespace of a template?

    Bernd
  • heaje
    Senior Member
    Zabbix Certified Specialist
    • Sep 2009
    • 325

    #2
    Use the item key in the formula, not the host:name syntax.

    Comment

    • Bernd Hohmann
      Member
      • Mar 2013
      • 46

      #3
      Originally posted by heaje
      Use the item key in the formula, not the host:name syntax.
      Doesnt work either

      I created template with two items:

      1) "Inbound" with key net.if.in[{$IF.NAME},bytes]
      2) "Avg. Inbound" with formula avg("net.if.in[{$IF.NAME}]",{$IF.AVERAGE})


      When I use this template on host "donald", the "Avg. Inbound" item complains with Cannot evaluate function [avg({$IF.AVERAGE})]: item [donald:net.if.in[{$IF.NAME}]] not found

      I can put the ",bytes" into the formula so the key matches 100%, but this doesn't change the message much.

      I guess the problem is, that the macro {$IF.NAME} isn't resolved here. What to do?

      Bernd

      Comment

      Working...