KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Consecutive test anomaly
Goto page 1, 2  Next
 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
msv



Joined: 15 Jan 2008
Posts: 11

PostPosted: Thu Jan 24, 2008 8:04 am    Post subject: Consecutive test anomaly Reply with quote

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
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Thu Jan 24, 2008 8:20 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
msv



Joined: 15 Jan 2008
Posts: 11

PostPosted: Thu Jan 24, 2008 9:14 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Thu Jan 24, 2008 9:31 am    Post subject: Reply with quote

Quote:
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.

Its pretty easy to implement. Add 3 actions into profile
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

Quote:
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.

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" options

PS Please use Problems and Bugs forum when something works incorrectly. For configuration questions, use Installation and Configuration forum

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
msv



Joined: 15 Jan 2008
Posts: 11

PostPosted: Thu Jan 24, 2008 10:23 am    Post subject: Reply with quote

Quote:
Then use "start when 1 bad result occurs", "repeat until status changes" options


Does status change mean any change? I thought it meant from good to bad or vice versa.

cheers, Paul
Back to top
View user's profile Send private message
msv



Joined: 15 Jan 2008
Posts: 11

PostPosted: Thu Jan 24, 2008 10:33 am    Post subject: Reply with quote

I actually wanted to start when any number of bad results and repeat x times. If I use advanced mode I can set bad results > 1, but how do I set repeat?

cheers, Paul
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Thu Jan 24, 2008 10:41 am    Post subject: Reply with quote

"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
Back to top
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Thu Jan 24, 2008 10:48 am    Post subject: Reply with quote

Quote:
I actually wanted to start when any number of bad results and repeat x times.

Sorry, I do not understand you well. You are using strange terminology...
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"??

Quote:
If I use advanced mode I can set bad results > 1, but how do I set repeat?

Use %Recurrences% macro variable.
Please read the following sections of the manual
http://www.ks-soft.net/hostmon.eng/mframe.htm#actions.htm#advancedaction
http://www.ks-soft.net/hostmon.eng/mframe.htm#actions.htm#macro

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
msv



Joined: 15 Jan 2008
Posts: 11

PostPosted: Thu Jan 24, 2008 11:23 am    Post subject: Reply with quote

"any number of bad results" in an expression would be: ('%SimpleStatus%'=='DOWN') and (%Recurrences%>=1)
If this statement is true, I want to repeat the test 2 times.

If I write the condition as an expression I cannot see how to run the "repeat test" action twice.

cheers, Paul
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Thu Jan 24, 2008 11:54 am    Post subject: Reply with quote

Quote:
"any number of bad results" in an expression would be: ('%SimpleStatus%'=='DOWN') and (%Recurrences%>=1)

%Recurrences% always >= 1 (unless test was not performed yet, in such case you should not care about %Recurrences% anyway)

Quote:
If I write the condition as an expression I cannot see how to run the "repeat test" action twice.

Its very easy
('%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
Back to top
View user's profile Send private message Visit poster's website
msv



Joined: 15 Jan 2008
Posts: 11

PostPosted: Fri Jan 25, 2008 2:52 am    Post subject: Reply with quote

Quote:
You don't need advanced action for this. You may use standard action:
- start when 1 consecutive bad result occurs
- repeat 2 times

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.
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?
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Fri Jan 25, 2008 3:43 am    Post subject: Reply with quote

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.
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.
Do you understand, that two foregoing options work in pair?
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.
You may achieve this using one of the following approaches:
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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
msv



Joined: 15 Jan 2008
Posts: 11

PostPosted: Fri Jan 25, 2008 5:59 am    Post subject: Reply with quote

Quote:
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')

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.
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
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Fri Jan 25, 2008 6:33 am    Post subject: Reply with quote

msv wrote:
Both of these settings cause "repeat test" to loop continuously.
Until status changes to "Good".
msv wrote:
I only wanted the test to repeat once, then return to the normal test cycle.
So, in this case you should enable "Start after 1 consecutive "Bad" results occur" and "Repeat 1 time" option.
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.
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.
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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
msv



Joined: 15 Jan 2008
Posts: 11

PostPosted: Fri Jan 25, 2008 6:51 am    Post subject: Re: Consecutive test anomaly Reply with quote

In my initial post I explained my requirements.
Quote:
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.

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.

cheers, Paul
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index