KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

run dynamic hm scripts

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
MirkoW



Joined: 01 Jul 2008
Posts: 205

PostPosted: Mon Feb 22, 2010 4:11 am    Post subject: run dynamic hm scripts Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Mon Feb 22, 2010 8:26 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
MirkoW



Joined: 01 Jul 2008
Posts: 205

PostPosted: Mon Feb 22, 2010 9:05 am    Post subject: Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Mon Feb 22, 2010 11:22 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
MirkoW



Joined: 01 Jul 2008
Posts: 205

PostPosted: Mon Feb 22, 2010 1:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Mon Feb 22, 2010 1:43 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
MirkoW



Joined: 01 Jul 2008
Posts: 205

PostPosted: Wed Feb 24, 2010 11:22 am    Post subject: Reply with quote

Hi,

thanks. i try it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index