| 
 To Anyone,, 
  
AIX 4.3.3, Netview 6.0.2, Framework 3.7.1 
  
TASK: When a core/ switch (Layer2) device (cisco) goes 
down -Link Down Trap, it should execute a pop-up window using ovwbeep stating 
the device name and text name of port. It should also send out 1 email to a 
separate group. (The pop up window should be displayed every time the Link goes 
down). 
  
I did $* on the trap to display all fields and got the 
following: 
  
[1] mgmt.mib-2.interfaces.ifTable.ifEnter.ifIndex.163 
(Integer): 163 
[2] 
mib-2.interfaces.ifTable.ifEntry.ifAdminstatus.163(integer):1 
[3]mib-2.interfaces.ifTable.ifOperstatus.163 
(interger):2 
[4]ifMib.ifMibobjects.ifXTable.ifXentry.ifName.163(octetString): 
6/41 
  
So, I can use $1 and $4 but this only gives me Index 
number (for example 163) and the Port number 6/41 
  
Now, I want the the name of the device which sent the trap and 
also the text name of the port (for example 6/41 is actually name NetviewBox). 
 
  
I did an snmpwalk on the device and found the followinginfo I 
could use: 
  
.1.3.6.1.4.1.9.5.1.4.1.1.4.x.x the last 2 x.x are the port 
6.41 and it gives the ascii textname. 
  
so I have script that will do an snmpget on above. The only 
variables needed are the name of the device and port 
  
portname=`/usr/OV/bin/snmpget $1 
.1.3.6.1.4.1.9.5.1.4.1.1.4.$2` echo 'Port name =' 
${portname##*:}
  
Question: How can i export the name of the device to be used 
in the script. 
  
I am having problems exporting the right variables. My popup 
window works fine but the only info I have displayed are: 
  
CORE DEVICE DOWN 
  
The email has: 
  
163 6/41 CORE DEVICE DOWN.. 
  
I want the popup window to have the right info--name of 
sending device and text name of port (on sending device). 
  
Any suggestions.. 
  
 |