Command to disable alerts?

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
MT-DRS
Posts: 2
Joined: Fri Jan 16, 2009 8:00 am

Command to disable alerts?

Post by MT-DRS »

Hi,

Is there a way of sending a command to Host Monitor to disable alerts?

I have servers that are taken offline daily for database maintenance and then rebooted and I'd like to put a 'disable Host Mon alerts' command at the start of my maintenance scripts, if possible.



Thanks!


MT
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

The only way to make HostMonitor disale alert automatically is to use "Execute HMS Script" action with "DisableAlerts" or "PauseAlerts" commands: http://www.ks-soft.net/hostmon.eng/mfra ... #actScript

For instance, you may organize it into the following way: your maintenace script should create special file, e.g. "C:\temp\disable.alt" In HostMonitor, you should create "File/Folder availability" test to check for this file, let's say, every several minutes, and assign "Execute HMS Script" action to this test. So, when "File/Folder availability" test detects "C:\temp\disable.alt" file, HostMonitor fires "Execute HMS Script" action that disables alerts. Please, do not forget to remove this file after alerts are disabled!

The problem is to enable alerts again. As alerts are disabled, no actions are fired, except "scheduled", executed by built-in "Scheduler" ("Options" -> "Scheduler"). First solution is to create an action profile with "Execute HMS Script" action and "EnableAlerts" command and schedule this action to be executed every hour or two on regular basis: http://www.ks-soft.net/hostmon.eng/mfra ... #SchedPage

Second solution is to use "PauseAlerts" command instead of "DisableAlerts" in "Execute HMS Script" action. "PauseAlerts" command pauses alerts for interval specified in minutes. In other words, all action profiles that usually were triggered by the change of test(s) status will not be executed within N minutes. http://www.ks-soft.net/hostmon.eng/mfra ... #actScript

Regards,
Max
MT-DRS
Posts: 2
Joined: Fri Jan 16, 2009 8:00 am

Post by MT-DRS »

Thanks for that information. Very useful as I'd not played with the HMS scripting.

I've used "DisableAllTests" and I set up a scheduled batch file to create a text file in a network folder at a certain time and then created a new Host Monitor entry to scan for that file.
(I have another scheduled batch file to run at the end of my daily maintenance scripts to remove the text file.)

I don't need a script to re-enable the testing so that's good enough for me!

Thanks for your help Max.


MT
Post Reply