run dynamic hm scripts

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
MirkoW
Posts: 210
Joined: Tue Jul 01, 2008 6:51 am

run dynamic hm scripts

Post by MirkoW »

hi,

It is able to put some hm-scripts into a folder and HM want to read/run this and delete it after them?

For example i dont want to create time schedules for each server/service/application that are need to be restart or in maintenance mode. So i think it is easier if i put hmscript-files with the needet commands (for example, disable test for few minutes) in an folder and hm want to read it.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

It is able to put some hm-scripts into a folder and HM want to read/run this and delete it after them?
You may setup "File/Folder Availability" test to check for such file and use "Execute HM Script" action assigned to the test.
For example i dont want to create time schedules for each server/service/application that are need to be restart or in maintenance mode.
Then you may use Planned Pause option implemented in version 8.50
http://www.ks-soft.net/hostmon.eng/news.htm

Regards
Alex
MirkoW
Posts: 210
Joined: Tue Jul 01, 2008 6:51 am

Post by MirkoW »

Hi,

The Planned Pause Option is not flexibility enough. For example if i make Backups/Snapshots from Harddrives, i dont want to run some test for monitor hdds. so i want to put the hm-scripts from script to a folder and hm want to read the file. but i want to use difference hm-files in a folder.

for example if i run 10 different backup-scripts from 10 different servers so there are 10 different hm-scripts in a folder that need to be run.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

So you plan to create some scripts that will generate HM Script files automatically? Just to pause some tests execution?
I think its more easy to create some flag (e.g. create temporaty file) then setup additional "File/Folder Availability" test to check for such file-flag and use this test as Master test for test items that you plan to pause.

This way your backup script needs simple modification:
===============
echo >c:\temp\backupflag1.tmp
startbackup
del c:\temp\backupflag1.tmp
===============
echo >c:\temp\backupflag1.tmp - creates temporary file
startbackup - starts your backup procedure
del c:\temp\backupflag1.tmp - remove temp file

Regards
Alex
MirkoW
Posts: 210
Joined: Tue Jul 01, 2008 6:51 am

Post by MirkoW »

this idea is not bad but this method need test specially for each action.

it is not able that HM can read dynamic hm-scripts in a folder sequentially ?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You may setup "File/Folder Availability" test method using some wildcard in the name. E.g. c:\hostmon\scripts\*.hms
Then you may assign "Execute HM Script" action to this test and use %FileName% macro variable as parameter of the action, e.g. c:\hostmon\scripts\%FileName%
Also you should assign "Repeat test" "bad" action to the same profile, this way HostMonitor will repeat test until test status changes to Ok (file not found).
Do not forget to add command to remove script file.

Regards
Alex
MirkoW
Posts: 210
Joined: Tue Jul 01, 2008 6:51 am

Post by MirkoW »

Hi,

thanks. i try it.
Post Reply