Server Management - Systems Insight Manager
1752577 Members
4541 Online
108788 Solutions
New Discussion юеВ

Setting up a script to include and exclude servers from paging.

 
SOLVED
Go to solution
punsac
Occasional Advisor

Setting up a script to include and exclude servers from paging.

Hi there,

In our current environment we use Openview and we have a .ini file that we use to include and exclude servers from paging everytime they are rebooted. By default all our servers are included in this .ini file but when we do a planned outage we exclude the server from this file by simply rem it out.

Now that we have intalled HP SIM 4.2, everytime we need to exclude a server we need to go under Automatic Event Handling\Manage tasks\The task and then the whole 6 steps to edit the task and exlcude the server.

Is there a script that somebody has out there or knows of a different way to include/exclude the servers instead of this lenghty one.

Any help is appreciated!!!

Thanks
Punsac
11 REPLIES 11
David Claypool
Honored Contributor

Re: Setting up a script to include and exclude servers from paging.

HP SIM 4.2 has a new feature for this exact situation. You'll find "Suspend/Resume Monitoring" on the links page for each system. You can give it a time delay for automatic re-enablement or suspend indefinitely.
punsac
Occasional Advisor

Re: Setting up a script to include and exclude servers from paging.

Thanks a lot. This is a cool feature which I wasn't aware of. It will make things easier for us as we have server maintenance on different servers almost on a daily servers.
Is there any script that I can use as well for this purpose? Like have it read from a file using the custom command or is it too complicated?

Another thing, while adding or editing a task, do we have to go through all the 6 steps even if we need to just change one thing? Is there a way to just edit one field?

Thanks again!

Punsac
David Claypool
Honored Contributor
Solution

Re: Setting up a script to include and exclude servers from paging.

"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.

For the other, you might want to use 'mxtask' to output an XML config file that you can edit and re-insert. See http://www.hp.com/go/hpsim --> Information Library --> mxtask.1m
punsac
Occasional Advisor

Re: Setting up a script to include and exclude servers from paging.

O.k. thanks a bunch!
Rob Buxton
Honored Contributor

Re: Setting up a script to include and exclude servers from paging.

Another approach is to use the Custom Command approach. I've a number of Servers whose outages we don't log to our outage system (dev, test etc.)
I have a script that formats the message but also reads a file which is a list of servers to exclude. I just edit the server list to stop the notifications. All done in perl.
punsac
Occasional Advisor

Re: Setting up a script to include and exclude servers from paging.

Hi Rob,

Is it possible for you to send me a copy of that script (general, without server names etc). I don't know perl but maybe I can check with my team and show them the script example and ask them to write something similar for us. Also, the custom command to execute it.

Let me know if its possible.

Thanks!
Punsac
Ron Rosenkoetter
Occasional Contributor

Re: Setting up a script to include and exclude servers from paging.

Quick follow-up question to an old thread.

The mxnode -m -f c:\Whatever.xml method works great when run locally on the SIM server.

However, is there an easy way to run this script remotely from another server? I'm trying to set up a web-page that will allow one to suspend monitoring on a server for 15 minutes.

I can use the WshController object if necessary, but I was wondering if HP put in some remote capabilities into their command-line tools for SIM.

Thanks for any help
David Claypool
Honored Contributor

Re: Setting up a script to include and exclude servers from paging.

Use SSH...
Brian'
New Member

Re: Setting up a script to include and exclude servers from paging.

Another follow-up question... are these really our only choices for the "mxnode -m -f FILENAME" solution?

Where PARAMETER can be suspend, suspend.5m, suspend.15m, suspend.1h, suspend.1d or resume.

Has anyone tested something like suspend.6h or suspend.3d? Sometimes we need to suspend monitoring for longer than an hour but less than a day... or longer than a day, but less than infinity...

We like the auto-resumption of monitoring, but we'd really like to see a bit more flexibility with it.