I apologize to my adoring fans (both of you) for the lack of posting. I’m in the middle of moving, buying a new house, selling my current house, getting a mortgage, etc. I’ve up until 11:30 nearly every night filling out forms and going through red tape. Don’t get me started on getting money from a 401k! Anyway…
I got in this morning, and a coworker was telling me that the data center’s HVAC was crippled due to an oil leak, and it was 90F in there. D’oh! It wasn’t quite that high, but it was warm. Luckily, all of our network gear is on the end of the rows with AC, so we’re safe, but it got me thinking about monitoring temperature of our 6500s via SNMP. I’ve done it via Cacti, but I never really looked how to do it manually.
I read this article on Cisco’s site which made it clear as mud. Basically, you have to query the entPhysicalIndex OID branch to get an integer that represents the physical sensor, then you query the entSensorValue to get the temperature. I made the lazy choice to use grep on entPhysicalDesc OID to find the module I wanted and use that to grep the entSensorValue for the temp.
Let’s say I’m looking for the outlet temperature (the temperature of the air on the way out) on module 3. First, let’s find out what th entPhysicalIndex is by walking the entPhysicalDesc OID and grepping out “module 3”.
1234567 [myserver]$ snmpwalk -c <COMM> -v 2c <HOST> 188.8.131.52.184.108.40.206.220.127.116.11 | grep "module 3"SNMPv2-SMI::mib-18.104.22.168.22.214.171.12401 = STRING: "module 3 power-output-fail Sensor"SNMPv2-SMI::mib-126.96.36.199.188.8.131.5202 = STRING: "module 3 insufficient cooling Sensor"<strong>SNMPv2-SMI::mib-184.108.40.206.220.127.116.1103 = STRING: "module 3 outlet temperature Sensor"</strong>SNMPv2-SMI::mib-18.104.22.168.22.214.171.12404 = STRING: "module 3 inlet temperature Sensor"SNMPv2-SMI::mib-126.96.36.199.188.8.131.5205 = STRING: "module 3 device-1 temperature Sensor"SNMPv2-SMI::mib-184.108.40.206.220.127.116.1106 = STRING: "module 3 device-2 temperature Sensor"
Since we’re looking for the outlet temperature, we can see the index in question is 3003. Now, we use that to query the entSensorValue.
12 [myserver]$ snmpwalk -c <COMM> -v 2c <HOST> 18.104.22.168.22.214.171.124.126.96.36.199.1.4.3003SNMPv2-SMI::enterprises.188.8.131.52.184.108.40.206.3003 = INTEGER: 19
Ah…a cool 19C.
This is not a very graceful way to do it, but it gets the job done in a pinch. I haven’t tested it, but I would imagine this technique would work on 7600s as well. I know it doesn’t work on 2950s and the like.
Send any house keys questions my way.