This procedure does the work for VPN interfaces. Modify it to run from
the NodeAdded trap and use the node part of the nvmaputil.sh command.
#!/bin/bash
# Unmanage interfaces added to networks 172.16. and 172.17 by VPN.
Date=`date`
let Result=${RANDOM}%20
# DEBUG echo "${Date} Variables: $* " >>/opt/webmon/IFAdd.log
IPAddress=`echo ${*} | sed -e 's/\\\\//g'`
echo "${Date} Variable IPAddress: ${IPAddress} "
>>/opt/webmon/IFAdd.log
Filter=`echo ${IPAddress} | egrep '(172.16.|172.17.)' | wc -l`
if [ ${Filter} -gt 0 ]
then
/bin/sleep ${Result} # Delay for some number of seconds between
zero and 20 to prevent races.
ObjID=`/usr/OV/bin/ovtopodump ${IPAddress} | awk 'NR>1 {print
$2}'`
echo "${Date} Acknowledge requested: ${IPAddress} Object:
${ObjID}. " >>/opt/webmon/IFAdd.log
/usr/OV/bin/event -b openview -e ACK_EV -a ${ObjID} -d
"Acknowledge ${IPAddress} ${ObjID}"
/usr/OV/bin/nvmaputil.sh --unmanage-interface ${IPAddress} &
echo "${Date} Interface unmanage requested: ${IPAddress} Object:
${ObjID} " >>/opt/webmon/IFAdd.log
fi
exit 0
-----Original Message-----
From: nv-l-bounces@lists.ca.ibm.com
[mailto:nv-l-bounces@lists.ca.ibm.com] On Behalf Of Rumsey, Robert
Sent: Tuesday, February 06, 2007 6:23 PM
To: nv-l@lists.ca.ibm.com
Subject: [NV-L] Unmanage command?
Hello there!
I'm running Netview V7.1.4 on Windows Server2003;
I would like to unmanage certain objects when they are discovered.
Does anyone know of a command to unmanage or manage objects so that it
could be configured to run in a script from the NodeAdded trap?
Thanks,
Bob Rumsey
Data Communications Specialist,
Telecommunications Services
ActewAGL
************************************************************************
*PLEASE NOTE* This email and any attachments may
be confidential. If received in error, please delete all
copies and advise the sender. The reproduction or
dissemination of this email or its attachments is
prohibited without the consent of the sender.
WARNING RE VIRUSES: Our computer systems sweep
outgoing email to guard against viruses, but no warranty
is given that this email or its attachments are virus free.
Before opening or using attachments, please check for
viruses. Our liability is limited to the re-supply of any
affected attachments.
Any views expressed in this message are those of the
individual sender, except where the sender expressly,
and with authority, states them to be the views of the
organisation.
************************************************************************
_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com
http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to
internal IBM'ers only)
|