Adding multiple tests

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
User avatar
dimmyr
Posts: 35
Joined: Sat Dec 28, 2002 6:00 pm
Location: Detroit, MI

Adding multiple tests

Post by dimmyr »

Can I batch add tests to HM? I currently have a structure where each one of the 40 servers I monitor has its own folder. When I add a test, say UNC test, I add it to one folder, and then I have to copy it individually to 39 more folders, and manually change settings like Master Test, Test Name, Comment, the UNC patch, etc. Big pain.

Is there a way to batch it, or maybe have macro variables for the folder name so that it changes based on the folder you copy the test to.

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

Post by KS-Soft »

Have you tried Replicator?
http://www.ks-soft.net/hostmon.eng/replicator/index.htm

Regards
Alex
User avatar
dimmyr
Posts: 35
Joined: Sat Dec 28, 2002 6:00 pm
Location: Detroit, MI

Adding multiple tests

Post by dimmyr »

Actually I have. It's free, so this is not complaining, just criticizing, ok? It has a rather clumsy interface, and the instructions are pretty unclear. From what I could experiment, it would be insufficient for most purposes, but I can't really tell.

As I have explained my problem above - I need the same test replicated to all the folders. Multiple parameters inside the test need to change according to the name of the destination folder. See example below.

The problem is that when I export the existing HML file to TXT, it has many more tests in it. So I don't quite understand the mechanics of the Replicator app, and how it's going to handle the task of taking a single test, cloning it into each particular folder and changing the parameters whithin each clone to match that folder. I would even be ok to place them all into the root and then drag them, but I have still been unsucsessfull in that task.

Oh - one more critique - my txt file is rather big - has over 200 tests in it. It makes Replicator lag for at least 15-30 seconds everytime I move focus away from the source window. Kinda frustrating...

;-----------------------------------------------------------------------------
; Folder: Root\WEBSERVER01\
;-----------------------------------------------------------------------------
;You may uncomment the following line to import tests exactly into src. folder
;DefaultFolder = Root\WEBSERVER01\


; ------- Test #08 -------


Method = CPU
;--- Common properties ---
RMAgent = WEBSERVER01
Title = CPU: WEBSERVER01
Comment = CPU Usage on WEBSERVER01
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 600
Alerts = Email Admins (after 2 bads)
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= Yes
PrivLogMode = Default
CommLogMode = Default
SyncCounters= Yes
SyncAlerts = No
DependsOn = list
MasterTest-Alive = PING: WEBSERVER01
;--- Test specific properties ---
Computer =
OS = NT
MaxCPUUsage = 90
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

The problem is that when I export the existing HML file to TXT, it has many more tests in it. So I don't quite understand the mechanics of the Replicator app, and how it's going to handle the task of taking a single test, cloning it into each particular folder and changing the parameters whithin each clone to match that folder.
You don't need to export entire HML file. E.g. If you have added 2 new tests for some server and you want to replicate these 2 tests for each server, export just 2 tests.
- Then start Replicator, load file, uncomment line that specifies folder

Code: Select all

;You may uncomment the following line to import tests exactly into src. folder 
DefaultFolder = Root\WEBSERVER01\
- Type WEBSERVER01 into "Replicate by" field and type/load/generate list of servers for replication. Click Replicate button and save result into some file.
- Switch back to HostMonitor and import new tests. That's it.
I just replicated your CPU test for 20 servers in 2 minutes (spent most of time for typing name of servers. if you already have list, you can replicate test for 100 servers within 1 min).
Oh - one more critique - my txt file is rather big - has over 200 tests in it. It makes Replicator lag for at least 15-30 seconds everytime I move focus away from the source window. Kinda frustrating...
Yes, it works slow with big files (if you replicate 200 tests for 40 servers, it should create 8000 tests). I agree

Regards
Alex
User avatar
dimmyr
Posts: 35
Joined: Sat Dec 28, 2002 6:00 pm
Location: Detroit, MI

Post by dimmyr »

Thank you. I'll try that.
peter_fleur
Posts: 9
Joined: Mon Dec 27, 2004 2:55 pm

Post by peter_fleur »

But does the Replicator work with RMA's? Cause we are only using RMA's and not scanning in our local network.

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

Post by KS-Soft »

Replicator works with text files. It doesn't need to know anything about RMA, test methods, alerts or anything else.
Nevertheless it can replicate tests. You just need to understand what parameter you should use for replication.

Regards
Alex
User avatar
plambrecht
Posts: 151
Joined: Wed May 19, 2004 8:11 am
Location: Belgium
Contact:

Post by plambrecht »

Alex,

Can you extend the replicator ?
For now we can only replace 1 string with another..
I would to replace more items...

Most of the time I have to change the RMA name also...

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

Post by KS-Soft »

If Replicator will replace several different parameters, you will need to provide several lists.
I mean usually admins use list of hosts/addresses as replacement list. What list(s) you want to use for 2nd, 3rd... parameters? List of agents?

Regards
Alex
User avatar
plambrecht
Posts: 151
Joined: Wed May 19, 2004 8:11 am
Location: Belgium
Contact:

Post by plambrecht »

Agent would be a start...
Also Commentlines should be changable...

Not urgent..

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

Post by KS-Soft »

Agent would be a start...
Also Commentlines should be changable...
Any parameter is changable. Question is
If Replicator will replace several different parameters, you will need to provide several lists.
I mean usually admins use list of hosts/addresses as replacement list. What list(s) you want to use for 2nd, 3rd... parameters?
Regards
Alex
mp1
Posts: 199
Joined: Tue Mar 07, 2006 3:24 am

Post by mp1 »

Helo Alex,

It would be nice, if you could also change the test name and comments ...
f.e. you have a list like this

192.168.0.1;TESTNAME1;
192.168.0.2;TESTNAME2;
...

A file import from a csv File or Excel File would be perfect, where you change all the test parameters ;-)

I wish you nice holidays and keep on the great work

Martin
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Post by JuergenF »

Maybe something like this can help

Save this to "Create_HostMonInput.cmd"
Create_HostMonInput.cmd wrote:@echo off
If exist HostMonInput.txt del HostMonInput.txt

; Header
echo ;----------------------------------------------------------------------------- >> HostMonInput.txt
echo ; Folder: Root\WEBSERVER01\ >> HostMonInput.txt
echo ;----------------------------------------------------------------------------- >> HostMonInput.txt
echo ;You may uncomment the following line to import tests exactly into src. folder >> HostMonInput.txt
echo ;DefaultFolder = Root\WEBSERVER01\ >> HostMonInput.txt

for /F "tokens=* delims=;" %%i IN (Inp.txt) DO call :sub1 %%i %%j %%k %%l %%m %%n %%o

; Footer
echo. >> HostMonInput.txt
echo ;----------------------------------------------------------------------------- >> HostMonInput.txt
echo ; we have finished >> HostMonInput.txt

goto exit


:sub1
echo. >> HostMonInput.txt
echo ; ------- Test #%1% ------- >> HostMonInput.txt
echo. >> HostMonInput.txt
echo Method = CPU >> HostMonInput.txt
echo ;--- Common properties --- >> HostMonInput.txt
echo RMAgent = %2% >> HostMonInput.txt
echo Title = CPU: %2% >> HostMonInput.txt
echo Comment = CPU Usage on %2% >> HostMonInput.txt
echo RelatedURL = >> HostMonInput.txt
echo ScheduleMode= Regular >> HostMonInput.txt
echo Schedule = >> HostMonInput.txt
echo Interval = 600 >> HostMonInput.txt
echo Alerts = Email Admins (after 2 bads) >> HostMonInput.txt
echo ReverseAlert= No >> HostMonInput.txt
echo UnknownIsBad= Yes >> HostMonInput.txt
echo UseCommonLog= Yes >> HostMonInput.txt
echo PrivLogMode = Default >> HostMonInput.txt
echo CommLogMode = Default >> HostMonInput.txt
echo SyncCounters= Yes >> HostMonInput.txt
echo SyncAlerts = No >> HostMonInput.txt
echo DependsOn = list >> HostMonInput.txt
echo MasterTest-Alive = PING: %2% >> HostMonInput.txt
echo ;--- Test specific properties --- >> HostMonInput.txt
echo Computer = %3% >> HostMonInput.txt
echo OS = NT >> HostMonInput.txt
echo MaxCPUUsage = 90 >> HostMonInput.txt

goto exit

:exit
Save this to "Inp.txt"
Inp.txt wrote:01;WEBSERVER01;192.168.168.1
02;WEBSERVER02;192.168.168.2
Importable Testfile "HostMonInput.txt" will look like

Code: Select all

;----------------------------------------------------------------------------- 
; Folder: Root\WEBSERVER01\  
;----------------------------------------------------------------------------- 
;You may uncomment the following line to import tests exactly into src. folder  
;DefaultFolder = Root\WEBSERVER01\  
 
; ------- Test #01 -------  
 
Method = CPU  
;--- Common properties ---  
RMAgent = WEBSERVER01 
Title = CPU: WEBSERVER01 
Comment = CPU Usage on WEBSERVER01 
RelatedURL =   
ScheduleMode= Regular  
Schedule =  
Interval = 600  
Alerts = Email Admins (after 2 bads)  
ReverseAlert= No  
UnknownIsBad= Yes  
UseCommonLog= Yes  
PrivLogMode = Default  
CommLogMode = Default  
SyncCounters= Yes  
SyncAlerts = No  
DependsOn = list  
MasterTest-Alive = PING: WEBSERVER01 
;--- Test specific properties ---  
Computer = 192.168.168.1 
OS = NT  
MaxCPUUsage = 90 
 
; ------- Test #02 -------  
 
Method = CPU  
;--- Common properties ---  
RMAgent = WEBSERVER02 
Title = CPU: WEBSERVER02 
Comment = CPU Usage on WEBSERVER02 
RelatedURL =   
ScheduleMode= Regular  
Schedule =  
Interval = 600  
Alerts = Email Admins (after 2 bads)  
ReverseAlert= No  
UnknownIsBad= Yes  
UseCommonLog= Yes  
PrivLogMode = Default  
CommLogMode = Default  
SyncCounters= Yes  
SyncAlerts = No  
DependsOn = list  
MasterTest-Alive = PING: WEBSERVER02 
;--- Test specific properties ---  
Computer = 192.168.168.2 
OS = NT  
MaxCPUUsage = 90 
 
;----------------------------------------------------------------------------- 
;  we have finished 
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

A file import from a csv File or Excel File would be perfect, where you change all the test parameters
Probably its better to add ODBC import/export function.
I wish you nice holidays and keep on the great work
Thank you. Merry Christmas and Happy New Year :)

Regards
Alex
Igorek
Posts: 47
Joined: Wed Jul 06, 2005 8:55 pm
Location: Russia

Post by Igorek »

KS-Soft wrote: Probably its better to add ODBC import/export function.
Yes. I vote.
And to add ODBC-import and ODBC-export commands in HMS script, please.
Post Reply