Ad Widget

Collapse

triggers : nodata() versus count()?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mdeavila
    Junior Member
    • Mar 2005
    • 12

    #1

    triggers : nodata() versus count()?

    I need to write a trigger that fires if a user parameter has not been able to retrieve any data for the past 12 minutes.

    Looks like are two possible trigger functions, nodata() and count().

    I'd prefer to use the count() function, since nodata() requires using trapper.

    I'd like the trigger to be
    ({production-vm:ap.count(720)}=0)

    Is this the appropriate use of the count() function?

    thanks,

    Miguel
  • lokha
    Junior Member
    • Jun 2020
    • 15

    #2
    Originally posted by mdeavila
    I need to write a trigger that fires if a user parameter has not been able to retrieve any data for the past 12 minutes.

    Looks like are two possible trigger functions, nodata() and count().

    I'd prefer to use the count() function, since nodata() requires using trapper.

    I'd like the trigger to be
    ({production-vm:ap.count(720)}=0)

    Is this the appropriate use of the count() function?

    thanks,

    Miguel
    i always use nodata and it works
    nodata is a special case of count

    Comment

    • dimir
      Zabbix developer
      • Apr 2011
      • 1080

      #3
      count() will never fire on 0 without a time shift. You don't want to depend on any value received so use nodata(). And it works on any type of item, not only trapper.

      Comment

      Working...