SNMP question
Jean-Christophe Ducom
jducom at nd.edu
Fri Jul 12 19:25:05 PDT 2002
Hi,
I want to use snmptrapd to catch a trap from the environmental unit
from APC (AP9312TH) if the cluster room gets too warm. But it doesn't
work :(
The apc unit is connected via a cross-over cable to the machine running
snmp via eth2 (10.0.0.11). The same machine is connected to the rest of
the cluster via eth0 (10.0.0.10). The IP of the environmental unit is
10.0.0.21
I can request the temperature by issuing the command:
#snmpwalk 10.0.0.21 bob mUpsEnvironAmbientTemperature
enterprises.apc.products.hardware.measureUps.mUpsEnviron.mUpsEnvironAmbientTemperature.0
= Gauge32: 17
So far so good. I configured the /etc/snmp/snmptrapd.conf as following
traphandle default /sbin/test
where test is a script to shutdown the cluster. This should catch any
trap.
When a trap message is issued from the envrionemental unit, I can see
the trap:
#tcpdump -i eth2 port 162:
21:06:48.763649 10.0.0.21.snmp > 10.0.0.11.snmptrap: C=bob Trap(40)
E:318 10.0.0.21 enterpriseSpecific[specific-trap(59)!=0] 467984
E:=[|snmp]
21:06:48.770348 10.0.0.21.snmp > 10.0.0.10.snmptrap: C=bob Trap(40)
E:318 10.0.0.21 enterpriseSpecific[specific-trap(59)!=0] 467984
E:=[|snmp]
But nothing in the log of snmptrapd configured w/ the option -o
/root/log (to test it)
If a trap is issued from another machine
# snmptrap -c bob 10.0.0.11 PowerNet-MIB::temperatureThresholdViolation1
10.0.0.21 2 0 '' SNMPv2-MIB::sysLocation.0 s "just here"
the log reports that the daemon got the trap message
# more log
2002-07-12 20:29:06 UCD-snmp version 4.2.5 Started.
2002-07-12 21:18:45 apctemp [10.0.0.21] (via xxx.xxx.xxx [10.0.0.1])
TRAP, SNMP v1, community bob
enterprises.apc.apc#.temperatureThresholdViolation1 Link Down
Trap (0) Uptime: 9:09:48.15
system.sysLocation.0 = just here
the routing table is:
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
apctemp * 255.255.255.255 UH 0
0 0 eth2
10.0.0.0 * 255.0.0.0 U 0 0 0
eth0
127.0.0.0 * 255.0.0.0 U 0 0 0
lo
snmpd works as it catches trap message from other machine, the
environemental unit sends trap message as tcpdump shows but the snmpd
daemon can't catch/read(?) them.
Of course there is a work around w/ a cron that reads via snmpwalk every
5mins or so the temperature. But it'd so much nicer to have this $#%#
snmp trap working.
Thanks for any help/idea.
JC
More information about the Beowulf
mailing list