Ad Widget

Collapse

Do templates/macros support basic arithmetics?

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

    #1

    Do templates/macros support basic arithmetics?

    I have a template like {myhost:TotalOut.avg(60)}>300000

    Would {myhost:TotalOut.avg(60)}>300*1000 work too (multiplying constants)?

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

    #2
    I know that kind of stuff works on the other side of the equation (ie: 1000*{myhost:TotalOut.avg(60)}>300), so I would assume it should work as you wrote here. Have you tried out your trigger? If not, I suggest trying it to verify it works.

    Comment

    • Bernd Hohmann
      Member
      • Mar 2013
      • 46

      #3
      Very difficult to evaluate.

      For example "1M" in a trigger is displayed as "1M" everywhere but when it comes to a comparision (for example "average value last 60 seconds > 1M), 1M is expanded to 1000*1000*1000.

      I tried 10*60 (for 10 minutes) in the value of a $MACRO. The macro is displayed as "10*60" but no multiplication is done (got an error).

      Bernd

      Comment

      Working...