Operating System - HP-UX
1832214 Members
2321 Online
110041 Solutions
New Discussion

Script to alert when new packages/nodes added

 
dev44
Regular Advisor

Script to alert when new packages/nodes added

I need to create a script that will monitor the cluster and alert whenever a new node or package has been added. I was thinking along the lines of having a baseline file taken from cmviewcl and then doing a compare all the time. When it finds something new, I am alerted and the new baseline file is created. I just wanted to put this out there in case there is a much easier way?

Thanks!
whatever
3 REPLIES 3
Mel Burslan
Honored Contributor

Re: Script to alert when new packages/nodes added

The same would be my approach as well but why ? Why and how a node or a package gets added to the cluster, without the admin (assuming it is you) getting notified about it ? Addition of a node or a package for that matter, requires a re-compilation of cluster binaries, i.e., cmapplyconf, hence takes the cluster down and back up again. Considering serceguard clusters are 99% of the time are deployed in production due to cost factors and to disrupt production in any enterprise environment, you have satisfy umpteen different requirements and get approvals, how in the world can someone easily add a node or a package without notifying the admins such that you need to run a scrip to check if this happened or not. Just curious.
________________________________
UNIX because I majored in cryptology...
dev44
Regular Advisor

Re: Script to alert when new packages/nodes added

Very large site and quite a few admins. I am setting up a monitoring center to monitor this type of activity as well as many others. It would be much more reliable than relying on humans to edit files when they remember. Automate as much as possible as humans forget!
whatever
Victor Fridyev
Honored Contributor

Re: Script to alert when new packages/nodes added

Hi

You can do something like that:
To create an "example file" as an output of
cmviewcl -l node | awk 'NR>2 {print $1}'
cmviewcl -l package | awk 'NR>2 {print $1}'

and to add into daily cron comparision of the output.
I have something similar for ioscan,lvmtab and bdf. Sometimes this may help.

HTH
Entities are not to be multiplied beyond necessity - RTFM