Execute HMS Script with a bat file?

Need new test, action, option? Post request here.
Post Reply
mp1
Posts: 199
Joined: Tue Mar 07, 2006 3:24 am

Execute HMS Script with a bat file?

Post by mp1 »

Hi,

Is there a possibility to execute a Hms script with a bat file?

In this case, we want to disable all alerts with a bat file, is there any chance?

Thanks in advance

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

Re: Execute HMS Script with a bat file?

Post by KS-Soft Europe »

mp1 wrote:Is there a possibility to execute a Hms script with a bat file?
In this case, we want to disable all alerts with a bat file, is there any chance?
Sorry, there is no such an option. However, you may execute HMS script on a regular basis using "built-in" Scheduler ("Options" -> "Scheduler").
http://www.ks-soft.net/hostmon.eng/mfra ... #SchedPage

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

Post by KS-Soft »

If you explain your needs, we can provide more options.
Basicaly its not a problem to disable alerts automatically. E.g. your BAT file may set some flag (create a file), HostMonitor may check for this flag on regular basis (e.g. you may use File/Folder Availability test method) and start HM Script. Also you may use Telnet Service and telnet client that may process simple scripts.

Question is how you can enable alerts once they are disabed? Probably its better to use PauseAlerts command instead of DisableAlerts?

Regards
Alex
mp1
Posts: 199
Joined: Tue Mar 07, 2006 3:24 am

Post by mp1 »

Code: Select all

If you explain your needs, we can provide more options. 
We have sometimes the problem, that some webservers run amok, and then we get hundreds of sms, although I have configured, that a sms will only be send after 3 bad and 3 good tests - maybe I will increase this value.

We have our own simple application, where we can execute programms with our handy ;-). We send a sms to our gateway and this will execute a bat file.
So my idea was a script to disable the alerts, when the "hostmonitor" run amok.

Also you may use Telnet Service and telnet client that may process simple scripts.
I already tried with "Expect", had no success until now, although I will have a further look on it. Or do you have any other programm for telnet scripts?

Regards,

Martin
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

We have sometimes the problem, that some webservers run amok, and then we get hundreds of sms, although I have configured, that a sms will only be send after 3 bad and 3 good tests - maybe I will increase this value
hundreds of sms? Do you mean all your servers fail at the same time? Then I assume there is some network problem. I would suggest to setup additional Master test to check network status and setup webserver checks as dependant test items.
http://www.ks-soft.net/hostmon.eng/mfra ... htm#Master
We send a sms to our gateway and this will execute a bat file.
So my idea was a script to disable the alerts, when the "hostmonitor" run amok
I think you may modify BAT file a little, it may set some flag (create a file), then you may setup HostMonitor to check for this flag on regular basis using "File/Folder Availability" test method and start HM Script when file is present and newer than 10 min (for example).

Regards
Alex
Post Reply