Thomas PING example - first 2 warning/bad as Normal

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Thomas PING example - first 2 warning/bad as Normal

Post by JuergenF »

Thomas asked for a solution for
thomasschmeidl wrote:- You ping a server.
- You have a "warning" threshold in case of slow replies (>200) and
- a "bad" threshold in case of very slow/no replies (>1000).
- And you consider the first two irregular (=warning or bad) replies as "normal"
Maybe I have one
First of all let's transfer that example to a CPU test. For me it's much easier to set up CPU load using cpustres.exe than creating different PING response times.
So my tested and verified example:

- You 'CPU-test' a server.
- You have a "warning" threshold in case of high usage (> 10 %) and
- a "bad" threshold in case of very high usage (> 30 %).
- And you consider the first two irregular (=warning or bad) recurrences as "normal"

Setup CPU test - Alert > 30 %
[x] Treat Warning status as Bad
[x] Use "Warning" status if: ("%SuggestedReply%" > "10 %") and ("%SuggestedReply%" <= "30 %")
[x] Use "Normal" status if: ("%SuggestedReply%" > "10 %") and (("%Status%" == "Ok") or ("%LastStatus%" == "Ok"))
This was tested and is working fine from my pov.

**********************************
Transfered to the PING example it should look like (NOT TESTED)
Setup PING test - Timeout 1000 ms
[x] Treat Warning status as Bad
[x] Use "Warning" status if: ("%SuggestedReply%" > "200 ms") and ("%SuggestedReply%" <= "1000 ms")
[x] Use "Normal" status if: ("%SuggestedReply%" > "200 ms") and (("%Status%" == "Host is alive") or ("%LastStatus%" == "Host is alive"))

I hope that will help Thomas and others
Best regards

Juergen
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Re: Thomas PING example - first 2 warning/bad as Normal

Post by JuergenF »

JuergenF wrote:[x] Use "Normal" status if: ("%SuggestedReply%" > "10 %") and (("%Status%" == "Ok") or ("%LastStatus%" == "Ok"))
This is even better - now you can decide how many Normal statuses we will have before warning/bad
("%SuggestedReply%" > "10 %") and (("%Status%" == "Ok") or (("%Status%" == "Normal") and (%CurrentStatusIteration% < 2)))
JuergenF wrote:[x] Use "Normal" status if: ("%SuggestedReply%" > "200 ms") and (("%Status%" == "Host is alive") or ("%LastStatus%" == "Host is alive"))
("%SuggestedReply%" > "200 ms") and (("%Status%" == "Host is alive") or (("%Status%" == "Normal") and (%CurrentStatusIteration% < 2)))
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Re: Thomas PING example - first 2 warning/bad as Normal

Post by JuergenF »

JuergenF wrote:("%SuggestedReply%" > "200 ms") and (("%Status%" == "Host is alive") or (("%Status%" == "Normal") and (%CurrentStatusIteration% < 2)))
Hi Thomas,
I've tested a bit more:
Try this as Normal expression for the PING test. We don't get a value > 1000 ms, but a sugestedStatus of "No answer"
(("%SuggestedReply%" > "200 ms") or ("%SuggestedStatus%" == "No answer")) and (("%Status%" == "Host is alive") or (("%Status%" == "Normal") and (%CurrentStatusIteration% < 2)))
thomasschmeidl
Posts: 166
Joined: Sat Apr 15, 2006 2:14 pm
Location: Germany, Bavaria

Post by thomasschmeidl »

Hi,

@ Juergen:

thank you very much for working on my examples. I did a lot of trials, too and want to present my considerations:

IMHO it is very important how to set the test threshold.
JuergenF wrote:- You 'CPU-test' a server.
- You have a "warning" threshold in case of high usage (> 10 %) and
- a "bad" threshold in case of very high usage (> 30 %).
- And you consider the first two irregular (=warning or bad) recurrences as "normal"
Solution:
CPU-test - Test threshold 10%
[x] use warning if ('%SuggestedReply%'>'10 %') and ('%SuggestedReply%'<'30 %')
[x] use normal if (%FailureIterations%>=1) and (%FailureIterations%<=2)
It works as desired, as the normal expression is processed after the warning expression.

IMHO the advantage of the expressions used is that they are simple and easy to understand. %FailureIterations% is used for the bad/warning recurrences and %SuggestedReply% is used for the numeric threshold. This is useful for many other settings, like in the following examples

Any test:
[x] use warning if (%FailureIterations%>=5) and (%FailureIterations%<=10)
[x] use normal if (%FailureIterations%>=1) and (%FailureIterations%<=4)

or:
Disk free Space test: Threshold=20%
[x] use warning if ('%SuggestedReply%'>'10 %') and ('%SuggestedReply%'<'20 %')
[x] use normal if ('%SuggestedReply%'>='20 %') and ('%SuggestedReply%'<='30 %')

The only thing where there the combination of %FailureIteration% and %SuggestedReply% won't work are tests like ping test where the test threshold is equal to the test timeout.
Explanation:
thomasschmeidl wrote:- You ping a server.
- You have a "warning" threshold in case of slow replies (>200) and
- a "bad" threshold in case of very slow/no replies (>1000).
- And you consider the first two irregular (=warning or bad) replies as "normal"
here you cannot use:
Ping test - Test threshold 200 ms
[x] use warning if ('%SuggestedReply%'>'200 ms') and ('%SuggestedReply%'<'1000 ms')
[x] use normal if (%FailureIterations%>=1) and (%FailureIterations%<=2)
because the test will never produce a (suggested) reply > 200ms

Solution:
a) to use more complex expressions like the ones you suggested
b) to enhance the ping test by a test threshold which is different from the timeout
Alex wrote:
You have a "warning" threshold in case of slow replies (>200) and a "bad" threshold in case of very slow/no replies (>1000). And you consider the first two irregular (=warning or bad) replies as "normal"
...
Would it be possible to enhance test properties by a bad test threshold which is less than the timeout (if no bad test threshold is given, test will be bad when timeout is reached)?

This would do the trick. May be we implement this...

Regards
Alex
@Alex:
Could you really implement this? :P

Cheers and Happy New Year

Thomas
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Post by JuergenF »

thomasschmeidl wrote:IMHO it is very important how to set the test threshold.
I see the difference :D
You are absolutely right. It does make things much easier to work with expressions when the test has reached the Bad threshold. Then the %FailureIteration% is >= 1 and can be used.
Many thanks for pointing that out to rookies like me :oops:
thomasschmeidl wrote:@Alex:
Could you really implement this? :P
Happy new year

Juergen
Post Reply