Consecutive test anomaly
Consecutive test anomaly
I have been trying to get a test to repeat 4 times before reporting a failure, but with the tests grouped into 2, wait 10 mins, 2, report failure. I have found that the Repeat field test is litterral so a "repeat after 1 bad" does not repeat if the bad count is greater than 1. The same holds for "good" counts.
There is no easy way to set the action to run for 1 or more consecutive results and then repeat.
Would it be possible to add a greater than check box to the properties page?
cheers, Paul
There is no easy way to set the action to run for 1 or more consecutive results and then repeat.
Would it be possible to add a greater than check box to the properties page?
cheers, Paul
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Sorry, probably I do not understand your needs. In fact, there are two boxes in "Action properties" window. First one is "Start when N consecutive" Bad/Good results occur. This parameter determines when to execute an action. For example you want to send a message to a network administrator's pager after three unsuccessful tests of the web server consecutively, set this parameter to 3. If you want to start action right after the test status was changed, set parameter to 1.
The second parameter ( "Repeat N times or until status changes") defines the number of repeats of the action if the status of the test was not changed. For example if you want to send an e-mail to a network administrator only once when test status changes, set this parameter to 1. If you need to execute action every time when test failed, set this option to "until status changes".
On my opinion, conjunction of these two options covers all posible variants. Could you explain what exact functionality you want to achieve?
Regards,
Max
The second parameter ( "Repeat N times or until status changes") defines the number of repeats of the action if the status of the test was not changed. For example if you want to send an e-mail to a network administrator only once when test status changes, set this parameter to 1. If you need to execute action every time when test failed, set this option to "until status changes".
On my opinion, conjunction of these two options covers all posible variants. Could you explain what exact functionality you want to achieve?
Regards,
Max
I have 2 actions specified, the first is check again, the second is send email.
I want to test again if a failure occurs, then wait 10 minutes (the normal test schedule). If the 3rd test fails, I want to test again and then send the email.
I can see now that I can add a second "check again" test to start after 3 consecutive bad status. It would be much easier if I could set the "start after" to be 1 or more bad status.
cheers, Paul
I want to test again if a failure occurs, then wait 10 minutes (the normal test schedule). If the 3rd test fails, I want to test again and then send the email.
I can see now that I can add a second "check again" test to start after 3 consecutive bad status. It would be much easier if I could set the "start after" to be 1 or more bad status.
cheers, Paul
Its pretty easy to implement. Add 3 actions into profileI want to test again if a failure occurs, then wait 10 minutes (the normal test schedule). If the 3rd test fails, I want to test again and then send the email.
1) "Repeat test" action: start when 1 bad result occurs, repeat 1 time
2) "Repeat test" action: start when 3 bad results occur, repeat 1 time
3) "Send e-mail" action: start when 4 bad results occur
1 or more? Do you want to start some action after 1st, 2nd, 3rd, 4th... bad result? Then use "start when 1 bad result occurs", "repeat until status changes" optionsI can see now that I can add a second "check again" test to start after 3 consecutive bad status. It would be much easier if I could set the "start after" to be 1 or more bad status.
PS Please use Problems and Bugs forum when something works incorrectly. For configuration questions, use Installation and Configuration forum
Regards
Alex
"good to bad or vice versa".
Also behaviour depends on additional test options such as "Tread Unknown status as Bad", "Tread Warning status as Bad".
For details please check the manual. I would recommend the following sections of the manual
- Action profiles
- Action properties
- Tests -> common properties -> Optional status processing
Regards
Alex
Also behaviour depends on additional test options such as "Tread Unknown status as Bad", "Tread Warning status as Bad".
For details please check the manual. I would recommend the following sections of the manual
- Action profiles
- Action properties
- Tests -> common properties -> Optional status processing
Regards
Alex
Sorry, I do not understand you well. You are using strange terminology...I actually wanted to start when any number of bad results and repeat x times.
What exactly means "any number of bad results"?? Action can be triggered after "specific" probe number, after "each" probe (when "specific" starts from 1).. but "any"??
Use %Recurrences% macro variable.If I use advanced mode I can set bad results > 1, but how do I set repeat?
Please read the following sections of the manual
http://www.ks-soft.net/hostmon.eng/mfra ... ncedaction
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro
Regards
Alex
%Recurrences% always >= 1 (unless test was not performed yet, in such case you should not care about %Recurrences% anyway)"any number of bad results" in an expression would be: ('%SimpleStatus%'=='DOWN') and (%Recurrences%>=1)
Its very easyIf I write the condition as an expression I cannot see how to run the "repeat test" action twice.
('%SimpleStatus%'=='DOWN') and (%Recurrences%<3)
However I still do not understand what are you doing. You don't need advanced action for this. You may use standard action:
- start when 1 consecutive bad result occurs
- repeat 2 times
Please, read the manual.
Regards
Alex
The problem with the standard action is that "start when 1 consecutive bad" only matches 1 recurrence, not 2 or more. This stops me repeating the test if there is more than 1 bad result, unless I can specify the exact number of bad occurences.You don't need advanced action for this. You may use standard action:
- start when 1 consecutive bad result occurs
- repeat 2 times
I would like to be able to repeat actions everytime the test runs and there is a bad result, regardless of the number of bad results.
cheers, Paul
p.s. can you move this to the Installation and Config forum?
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
It is not true. "Start when 1 consecutive bad" really means that HostMonitor starts fire alerts after FIRST (not ONE) occurence of "Bad" result. However, if you want HostMonitor to fire alert every time test failed (after First occurence), please enable "Repeat until status changes" option.msv wrote:The problem with the standard action is that "start when 1 consecutive bad" only matches 1 recurrence, not 2 or more. This stops me repeating the test if there is more than 1 bad result, unless I can specify the exact number of bad occurences.
Do you understand, that two foregoing options work in pair?
You may achieve this using one of the following approaches:msv wrote:I would like to be able to repeat actions everytime the test runs and there is a bad result, regardless of the number of bad results.
1. "Standard" mode action. You should enable "Start after 1 consecutive "Bad" result occur" and "Repeat until status changes" option.
2. "Advanced mode" action. Please use following expression: ('%SimpleStatus%'=='DOWN')
Regards,
Max
Both of these settings cause "repeat test" to loop continuously. I only wanted the test to repeat once, then return to the normal test cycle.1. "Standard" mode action. You should enable "Start after 1 consecutive "Bad" result occur" and "Repeat until status changes" option.
2. "Advanced mode" action. Please use following expression: ('%SimpleStatus%'=='DOWN')
Currently I have 2 "repeat test" actions that have specific "start after" numbers. This is OK for initial monitoring but does not really provide the flexibility I was hoping to achieve.
I think this is one for the Feature Request bucket.
cheers, Paul
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Until status changes to "Good".msv wrote:Both of these settings cause "repeat test" to loop continuously.
So, in this case you should enable "Start after 1 consecutive "Bad" results occur" and "Repeat 1 time" option.msv wrote:I only wanted the test to repeat once, then return to the normal test cycle.
In fact, it is hard to understand what behavior you want to achieve. In each post you write a "piece" of necessary information and it is difficult to combine these "pieces" into "whole" picture. If you wrote your full requiremetns, we would suggest you the way to figure it out.msv wrote:Currently I have 2 "repeat test" actions that have specific "start after" numbers. This is OK for initial monitoring but does not really provide the flexibility I was hoping to achieve.
As you know, "Repeat test" action forces HostMontior to perform the test immediately. And it forces Hostmonitor to execute action again. It looks like a loop. Probably, it worth to try "Change test interval" action? Also, you may try expression like this: ('%SimpleStatus%'=='DOWN') and (%Recurrences% mod 3==1)
With this expresion, action will be executed after 1st, 4th, 7th, 10th, 13th, ... consecutive failed test.
Regards,
Max
Re: Consecutive test anomaly
In my initial post I explained my requirements.
cheers, Paul
This only seems possible by setting multiple "repeat test" actions with specific "start after" numbers. It would have been easier to create and test the action, and more flexible, if I could set the action to occur if the test is bad, but only repeat once.I have been trying to get a test to repeat 4 times before reporting a failure, but with the tests grouped into 2, wait 10 mins, 2, report failure.
cheers, Paul