Reset test status at a specific time

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
Kapz
Posts: 216
Joined: Mon Dec 06, 2004 2:33 pm
Location: Denmark

Reset test status at a specific time

Post by Kapz »

Hi !

We check all our machines 24/7 but on some of them we only want alerts daily between 8 AM and 4 PM. For this to be done the alert profile for these machines have a time restriction that prevents our SMS System from beeing executed between 4 PM and 8 AM.

Now, the problem is that if one of these servers fail at e.g. 2:30 AM we will not be notified about this when the clock strikes 8 AM as HostMonitor have known this for the past five and a half hours and have executed the command for a failed event long time ago.

Is there any way I can get around this and force HostMonitor to reset the status of these tests at a specific time - in this case 8 AM ?

I don't want to put a schedule on the monitoring of these machines as it is very impotant for me to have logs over these machines 24/7 - I just don't want to be notified on errors between 4 PM and 8 AM.

Thanx in advance !

Kasper :O)
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You may execute HMScript with "ResetRecurrencesAll" command. This command was implemented in version 4.86
Quote from the manual:
http://www.ks-soft.net/hostmon.eng/mfra ... #actScript
Note: after Recurrences counter is set to 0, HostMonitor will interpret ANY status assigned by next check as "new" status. E.g. if 1st check after you have used ResetRecurrencesTest command returns "Ok" status, HostMonitor will consider that previous status of the test was not "Ok" (either "Bad" or "Unknown"). This allows you to forcibly start actions that already were executed (e.g. for testing purpose).
HostMonitor will start "good" actions for "alive" hosts and "bad" actions for "dead" hosts.

Regards
Alex
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

PS In addition you may use "RefreshAll" command to recheck all test items.
Kapz
Posts: 216
Joined: Mon Dec 06, 2004 2:33 pm
Location: Denmark

Post by Kapz »

Thanks Alex.

But ...

"E.g. if 1st check after you have used ResetRecurrencesTest command returns "Ok" status, HostMonitor will consider that previous status of the test was not "Ok" (either "Bad" or "Unknown")."

Won't this cause me to receive a lot of new "Up" messages upon the execution of the ResetRecurrencesTest command even if the test have been up all the time ?
I mean - can I avoid having messages sent upon an execution of the ResetRecurrencesTest command ?

Thanx !

Kasper :O)
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Won't this cause me to receive a lot of new "Up" messages upon the execution of the ResetRecurrencesTest command even if the test have been up all the time ?
This will cause... But I don't see another solution (in current version).
Probably we can implement some parameters for ResetRecurrencesTest command, like ResetRecurrencesTest <testname> | _AllBad | _AllUnknown | _AllGood

Regards
Alex
Kapz
Posts: 216
Joined: Mon Dec 06, 2004 2:33 pm
Location: Denmark

Post by Kapz »

Alex,

> Probably we can implement some parameters for
> ResetRecurrencesTest command, like
> ResetRecurrencesTest<testname> | _AllBad | _AllUnknown | _AllGood

Yes, this would be extremely helpful - thanx !

Kasper :O)
Wooltown
Posts: 115
Joined: Wed May 22, 2002 6:00 pm
Location: Sweden

Post by Wooltown »

If you use the "ResetRecurrencesAll" at 07:50 and you make all your tests every 5 minutes, it could fix your problem.


Sven
Kapz
Posts: 216
Joined: Mon Dec 06, 2004 2:33 pm
Location: Denmark

Post by Kapz »

Sven,

> If you use the "ResetRecurrencesAll" at 07:50 and you make all your
> tests every 5 minutes, it could fix your problem.

Well, I run all of my tests once every minute ... but how could an interval of 5 minutes help in my case ?
Isn't the main problem that HM will force a change in the result of any tests upon a ResetRecurrencesAll ?

Kasper :O)
Wooltown
Posts: 115
Joined: Wed May 22, 2002 6:00 pm
Location: Sweden

Post by Wooltown »

Hi Kasper !

The solution I suggested wasn't the idea that you should make your test every 5 minutes, it was just an example, if you use the "ResetRecurrencesAll" 5 or 10 minutes before your clock strikes 8 and "test A" changes from BAD to OK before 8 o'clock, you won't get an SMS indicating status change to OK.

Hope that makes sense

Regards
Sven
Kapz
Posts: 216
Joined: Mon Dec 06, 2004 2:33 pm
Location: Denmark

Post by Kapz »

Sven,

Ah - I get the idea now ;)

It won't solve my problem though, but if Alex could implement some parameters for ResetRecurrences making it only react on items that go bad upon the ResetRecurrences execution I would be a happy camper :)

Kasper :O)
Mogge
Posts: 83
Joined: Thu Mar 04, 2004 3:38 pm
Location: Denmark

Post by Mogge »

Hi Alex!

Remember this: http://www.ks-soft.net/cgi-bin/phpBB/vi ... highlight=

This is the same problem.

/Mogge
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Its easier to implement parameters for ResetRecurrences command than implement StartAllBadActionsForFailedTest command (script module doesn't have access to actions).
Probably we can implement these options in next version

Regards
Alex
Mogge
Posts: 83
Joined: Thu Mar 04, 2004 3:38 pm
Location: Denmark

Post by Mogge »

Okay - I'll put it in another way...

A command like ResetRecurrencesTest <testname> | _AllBad | _AllUnknown | _AllGood will give me the same result as a command like StartAllBadActionsForFailedTest if I handle it like Sven describes.

It will do the job for me.


/Mogge
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Yes, I know.
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

There is update at www.ks-soft.net/download/hm494.zip
It allows you to use _AllBad, _AllUnknown and _AllGood as <testname> parameter for the following commands (HMScript):
RefreshTest
ResetTest
EnableTest
DisableTest
SetTestParam
ReplaceTestParam
ResetEventLogRefPoint
ResetRecurrencesTest
e.g. ResetRecurrencesTest _AllBad

Please note: this is "unofficial" update, means there are some undocumented modifications. It was tested and seems to be working fine but it was not tested much. So, better if you keep your eyes on it for a while.

Regards
Alex
Post Reply