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):
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
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
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
Comment