Server Management - Systems Insight Manager
1752569 Members
4980 Online
108788 Solutions
New Discussion юеВ

Re: pause monitoring tool

 
Steve Griffee
Occasional Contributor

pause monitoring tool

I have two questions really.

1) is there a command line tool to pause monitoring for a specific hostname for SIM 4.2?

2) is there a document file that can help me find answers to questions about the HP SIM command line tools in the future? Hunting on the HP web site and locally on the SIM server proved fruitless for me. :(

Thanks!
16 REPLIES 16
rijsbergen
Frequent Advisor

Re: pause monitoring tool

Steve,

Ad 1)
Yes, but unfortunately not directly. Using the 'mxnode' command with an .XML input file should do the trick. But since you want to make it independant of a node you need to generate the .XML on the moment you need it with the node specific info in it.
Sorry, i do not have an working example for you. Maybe somebody else already tweaked a nifty .BAT or .VBS script.

Ad 2)
On the web (www.hp.com/go/hpsim in the information library area) or on the Management CD itself there is a PDF (hpsim_userguide). Check chapter 11 'HP Systems Insight Manager commands.
Or when you started the SIM GUI go to: Help - For HP Systems Insight Manager - select 'table of contenst' - on that page search for 'command line interface'. There are all the commands and pointers to the specific help of that command.

Regards, Marcel
Regards,
Marcel Rijsbergen
Steve Griffee
Occasional Contributor

Re: pause monitoring tool

I found the solution in a document at

http://h18004.www1.hp.com/products/servers/management/hpsim/info-library%5Cmxnode.1m.html

(thanks to a google search believe it or not)

That web page provides a detailed manual for the mxnode tool. Given that, I was able to write a quick little perl script that will write an xml file that mxnode can use to control monitoring on a specific host.

Thanks for the pointer to the mxnode command.

Steve
Scott Shaffer
Esteemed Contributor

Re: pause monitoring tool

Hey Steve - can you share the script?
Dude, we've been totally misled by our album covers!
David Claypool
Honored Contributor

Re: pause monitoring tool

From a related post at http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=803555 :

"Suspend/Resume Monitoring" can be done with the mxnode command to modify using an XML file. It would look like this:

mxnode -m -f FILENAME

...with the XML file formatted like:






Where PARAMETER can be suspend, suspend.5m, suspend.15m, suspend.1h, suspend.1d or resume.
jim goodman
Trusted Contributor

Re: pause monitoring tool

How does one go about incorprating this script?

And can you select multiple systems to apply it to? I think this maybe exactly what one of my customers is looking for.

Thans,
Jim
Steve Griffee
Occasional Contributor

Re: pause monitoring tool

Jim,

I'm not sure what you are asking for in regards to "incorporating" the script. Scripting the HP tool mxnode has nothing to do with the insight manager environment or menus. It's just a convenient method for using the mxnode tool. I don't think you can create custom menus in the insight manager interface, but I'm not the expert in that realm.

You can use the same HP tool (mxnode) in a simple batch script to achieve the same thing and then use another file that contains a list of host names which is read in by the executing script, but you have to be familiar the proper cscript commands to do that. One help I can offer is type in the command "for /?" to begin to understand how to create a scripting loop that runs the mxnode command against a list of host names.

Something like this below would be a good example, but I'd recommend you tinker with it to understand it better before implementing it for a client:

@echo off

set logfile=settrigger.txt
set hostfile=hostfile.txt

for /F "tokens=1" %%i in (%hostfile%) do call :settrigger %%i

goto end

:settrigger
if '%1'=='' goto :end
set hostname=%1
ping -n 1 %hostname%
:end


Hope that helps,
Steve
jim goodman
Trusted Contributor

Re: pause monitoring tool

Thanks Steve!

That is out of my league for sure and turns to not be what I was looking for, but thank you for the time.

- Jim
David Claypool
Honored Contributor

Re: pause monitoring tool

Bumped to be above moved questions...
Jimmy Rueedi
Frequent Advisor

Re: pause monitoring tool

Cause there is no response if this can be ran without an xml and without the guid, I sat down and wrote a vbscript "solution"

There are two scripts:
The small one (in this response) is mentioned to put in the netlogon share of the domain: SrvSuspendMonitoring.vbs

I created a domain policy onto the OU where our servers are located in, where this script is executed while shutting down and starting up the servers with the corresponding parameters
- startup: SrvSuspendMonitoring.vbs /Mode:"resume"
- shutdown: SrvSuspendMonitoring.vbs /Mode:"suspend.15m"

You have to modify this file in the following way:
Between line 25 and 29, you have to provide the corresponding informations.
Please remeber to create an encrypted vbe- File out of this vbs, because everyone has read access to the netlogon share!!
We are using a domain user without any resources graned except local administrator on the HP SIM machine....

the bigger one (in the next response) has to be located on the HP SIM computer and runs the mxnode utility twice:
The first time it does a mxndoe -lf servername
The second time it does the mxnode -m -f xmlfile.xml

If a node is in on of the following modes suspend, supsend.1h or suspend.1d; there will no action taken, becaus we assume that the node is in maintenance.

Hope this helps someone..

Regards Jimmy