Server Management - Systems Insight Manager
1825747 Members
2392 Online
109687 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
Jimmy Rueedi
Frequent Advisor

Re: pause monitoring tool

The second script which has to be located on the HP SIM (remember ot modify the path in he first file if you are using another path than D:\Scripts or changing the file name of this script)...

Have fun

Jimmy
Steven J. Marty_2
Frequent Advisor

Re: pause monitoring tool

Did anyone find a solution to running this natively via the CLI without the GUID value? We are looking for a simple way to suspend and resume monitoring for a given host or hosts.

If there is no simple way to do this via the CLI without the GUID value, is there an easy way to extract the GUID using the host name and dynamically include that in the .XML that MXNODE calls?

Thanks.
Jimmy Rueedi
Frequent Advisor

Re: pause monitoring tool

take a look into the attached files I uploaded the last two postings...

We are working now since several weeks and are pretty satisfied with this solution.

Regards
Jimmy
Peter Hopkin
New Member

Re: pause monitoring tool

Hi all,

I have been trying to work with the mxnode and i'm having issues with the "resume" function.

When i use the xml file i can set any of the suspend levels and then all work, howver wehn i try to "resume" it doesn't do anything.

Does anyone have any ideas ?

Thanks in advance.

Peter
Jimmy Rueedi
Frequent Advisor

Re: pause monitoring tool

Can you provide us relevant parts of the xml and the commandline you are using?

Regards
Jimmy
tobro-home
Advisor

Re: pause monitoring tool

I have a tool that you can use, i use it to suspend and resume, suspend for 1h 15min etc...without logging into HPSIM .....click here to download the tool

 

first you need this below:

 

HP SIM 6.3.1  fix you have to

links.

http://g1w0134.austin.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&taskId=110&prodSerie...

Hotfix can be downloaded here:

http://h18013.www1.hp.com/products/servers/management/hpsim/dl_windows63.html#hotfix63\

 

I made a spread that help me suspend muliple servers from excel

Here are my

 

video how to use the tool

http://www.screencast.com/t/vfBeBXiZ 

 

     My code TXT,   How to docs and  xlsm App attached which is ZIP

let me know if need help email tonyb@mr-itpro.com

xml code

how to doc

xlsm.file

 

 other forum links

 

http://h30499.www3.hp.com/t5/ITRC-HP-SIM-tools-and-scripts/Suspend-Resume-tool-for-HP-SIM/m-p/5716093

 

 

http://h30499.www3.hp.com/t5/ITRC-HP-SIM-tools-and-scripts/pause-monitoring-tool/m-p/5716081#M646

 

 

http://h30499.www3.hp.com/t5/ITRC-HP-SIM-tools-and-scripts/HP-SIM-Suspend-resume-monitoring-for-blackout/m-p/5711039#M645

 

 

 

 

tobro-home
Advisor

Re: pause monitoring tool

video how to use the tool

http://www.screencast.com/t/vfBeBXiZ 

 

files are attached or download here

 

questions please email @ tonyb@mr-itpro.com