Ad Widget

Collapse

Problem with count function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jcrosnier
    Junior Member
    • Mar 2015
    • 2

    #1

    Problem with count function

    Hi,

    I am trying to set up a trigger to count number of regexp found on a webpage for the three last value collected.
    I want to alarm only if the regexp is not on the web page the last three times (item is refreshed every minutes).

    So i've made this expression (webpage and regexp to test are set in macro):

    Code:
    {MYHOST:web.page.regexp[{$SITE_SURV1},,80,{$TAG_SURV1}].count(#3,{$TAG_SURV1},like)}=0
    This works but immediatly after the first failed, it does not expect the three missing regexp.

    To understand the matter i've made a calculated item with this count function. If everything is normal, the function returns 3. If the regexp is not found, function returns immediatly 0 and when it comes back , it returns 1 then 2 and 3.

    What am I missing? Why when the regexp is no found function returns 0 and not 2,1 then 0.

    Thanks
  • jcrosnier
    Junior Member
    • Mar 2015
    • 2

    #2
    Nobody with an idea ?

    To have the alarm after the third fail I've set up my Action to send email at the step 3, but I've the event noticed on the dashboard, it's not clean.

    Thanks.

    Comment

    Working...