View previous topic :: View next topic |
Author |
Message |
MirkoW
Joined: 01 Jul 2008 Posts: 205
|
Posted: Mon Feb 22, 2010 4:11 am Post subject: run dynamic hm scripts |
|
|
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. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12792 Location: USA
|
Posted: Mon Feb 22, 2010 8:26 am Post subject: |
|
|
Quote: | 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.
Quote: | 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 |
|
Back to top |
|
|
MirkoW
Joined: 01 Jul 2008 Posts: 205
|
Posted: Mon Feb 22, 2010 9:05 am Post subject: |
|
|
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. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12792 Location: USA
|
Posted: Mon Feb 22, 2010 11:22 am Post subject: |
|
|
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 |
|
Back to top |
|
|
MirkoW
Joined: 01 Jul 2008 Posts: 205
|
Posted: Mon Feb 22, 2010 1:32 pm Post subject: |
|
|
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 ? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12792 Location: USA
|
Posted: Mon Feb 22, 2010 1:43 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
MirkoW
Joined: 01 Jul 2008 Posts: 205
|
Posted: Wed Feb 24, 2010 11:22 am Post subject: |
|
|
Hi,
thanks. i try it. |
|
Back to top |
|
|
|