nv-l
[Top] [All Lists]

[nv-l] SNMP Configuration Cleanup script

To: "IBM NetView Discussion (E-mail)" <nv-l@lists.tivoli.com>
Subject: [nv-l] SNMP Configuration Cleanup script
From: "Davis, Donald" <donald.davis@firstcitizens.com>
Date: Tue, 12 Nov 2002 14:46:01 -0500

To all -
Here is a korn shell script that you can use to clean up the legacy host names in your SNMP Configuration.
This is necessary if you attempt to use xnmsnmpconf with the import option.
The legacy host names will be exported just fine. However, all hostnames must be defined in the database, otherwise the import will fail.

Don Davis




cat /usr/OV/conf/ovsnmp.conf |
    grep -vE "^[0-9|#|*]" |
    awk 'BEGIN{FS=":"}{print $1}' > /tmp/checksnmp.tmp
while read HOST
do
  SelName=`nvUtil e "isNode=True && 'Selection Name' ~ '$HOST'"`
   if [[ $HOST != $SelName ]] ; then
      print $HOST needs to be deleted from SNMP Configuration
   fi
done  < /tmp/checksnmp.tmp

------------------------------------------------------------------------------
This electronic mail and any files transmitted with it are confidential and are intended solely for the use of individual or entity to whom they are addressed. If you are not the intended recipient or the person responsible for delivering the electronic mail to the intended recipient, be advised that you have received this electronic mail in error and that any use, dissemination, forwarding, printing, or copying of this electronic mail is strictly prohibited. If you have received this electronic mail in error, please immediately notify the sender by return mail.

==============================================================================

<Prev in Thread] Current Thread [Next in Thread>
  • [nv-l] SNMP Configuration Cleanup script, Davis, Donald <=

Archive operated by Skills 1st Ltd

See also: The NetView Web