Ad Widget

Collapse

Nodata function equals zero in recovery - not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • registration_is_lame
    Senior Member
    • Nov 2007
    • 148

    #1

    Nodata function equals zero in recovery - not working

    The nodata trigger works fine when it is set to .nodata(30)}=1. But I need to ensure there is data for last 10 minutes (.nodata(600)}=0).

    Trigger:

    {host1:item_status.nodata(30)}=1

    Recovery:

    {host1:item_status.nodata(600)}=0

    But the recovery alert is sent instantly. Any suggestions?


    Code:
    {host1:item_status.nodata(30)}=1
    
    
    2019-12-31 10:08:41    4  -> Alert recovers instantly since it has data.
    
    
              (nodata)    -> Alerts gets triggered due to no data
    2019-12-31 08:47:41    4
    2019-12-31 08:46:41    0
    2019-12-31 08:45:41    0
    2019-12-31 08:44:41    0
    2019-12-31 08:44:17    4
    But I want something like this:

    Code:
    {host1:item_status.nodata(600)}=0
    
    
    2019-12-31 10:10:17    4  -> Has data for last 10 minutes. Send recovery alert.
    2019-12-31 10:10:05    4
    2019-12-31 10:09:53    4
    2019-12-31 10:09:41    4
    2019-12-31 10:09:29    4
    2019-12-31 10:09:17    4
    2019-12-31 10:09:05    4
    2019-12-31 10:08:53    4
    2019-12-31 10:08:41    4  -> incoming new data
    
    
               (nodata)    -> Alerts gets triggered due to no data
    2019-12-31 08:47:41    4
    2019-12-31 08:46:41    0
    2019-12-31 08:45:41    0
    2019-12-31 08:44:41    0
    2019-12-31 08:44:17    4
  • registration_is_lame
    Senior Member
    • Nov 2007
    • 148

    #2
    Filed a bug and got a work around.



    nodata(600)=0 means there should be data for 600 seconds. Right, if you have some values in last 10 min, this expression becomes true (it doesn't matter if the value was received in the last second or it was received every 1 minute in the last 10 minutes)

    So it works as expected =)

    You can try icmpping or for example some of net.tcp.service[] if applicable with .min(10m)=1 function in recovery expression.

    Also be careful using nodata function in recovery expression as you always need first get problem expression as false and only then recovery expression as true too
    So I'm now using the following item for the recovery alert.
    Code:
    {host1:icmp.max(600)}=0

    Comment

    Working...