Ad Widget

Collapse

Count function not working as expected

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leonardomachado
    Junior Member
    • Jun 2012
    • 19

    #1

    Count function not working as expected

    How to create a trigger this trigger?

    1 - Check CPU avg5 (average 5 min)
    2 - count if the last 3 returned values are greater then 5
    3 - if count=3, event occurs

    {myserver:system.cpu.load[,avg5].count(#3,5,'gt')}=3

    Is it right?
    I am receiving the following error message:

    Evaluation failed for function: {myserver:system.cpu.load[,avg5].count(#3,5,'gt')}=3

    Thank you.
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    that should work, assuming your item has at least 3 values - but why not use something simpler like min() or avg() ?
    Zabbix 3.0 Network Monitoring book

    Comment

    • leonardomachado
      Junior Member
      • Jun 2012
      • 19

      #3
      ok, changing triggers to use min and avg.
      thnks.

      Comment

      • Strategist
        Member
        • Sep 2013
        • 54

        #4
        Hello
        Question is very old, but maybe I can help someone, now also faced with the problem that occurs, the function "count" return errors "Evaluation failed for function", the reason was quoted in the "count(#10,20,"gt")} = 10" after that took them as: "count(#10,20,gt)} = 10" all earned.

        Comment

        Working...