1820493 Members
2089 Online
109624 Solutions
New Discussion юеВ

net-snmp problem

 
Shaun Malone
Occasional Contributor

net-snmp problem

I have installed hpasm on one of our DL320s running RHEL4. I can measure fan speeds, temperatures etc. ok using hplog but cannot query the health information via SNMP.

cmahealthd is present in the process list.

This is what I get when trying to do an snmp walk through the relevant section of the MIB tree.

snmpwalk -c public -v 1 localhost 1.3.6.1.4.1.232
SNMPv2-SMI::enterprises.232.1.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.1.1.2.0 = INTEGER: 16
SNMPv2-SMI::enterprises.232.1.1.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.2.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.2.1.2.0 = INTEGER: 23
SNMPv2-SMI::enterprises.232.2.1.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.3.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.3.1.2.0 = INTEGER: 30
SNMPv2-SMI::enterprises.232.3.1.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.5.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.5.1.2.0 = INTEGER: 32
SNMPv2-SMI::enterprises.232.5.1.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.6.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.6.1.2.0 = INTEGER: 19
SNMPv2-SMI::enterprises.232.6.1.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.8.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.8.1.2.0 = INTEGER: 24
SNMPv2-SMI::enterprises.232.8.1.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.10.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.10.1.2.0 = INTEGER: 4
SNMPv2-SMI::enterprises.232.10.1.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.11.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.11.1.2.0 = INTEGER: 21
SNMPv2-SMI::enterprises.232.11.1.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.14.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.14.1.2.0 = INTEGER: 8
SNMPv2-SMI::enterprises.232.14.1.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.16.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.16.1.2.0 = INTEGER: 22
SNMPv2-SMI::enterprises.232.16.1.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.21.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.21.1.2.0 = INTEGER: 10
SNMPv2-SMI::enterprises.232.21.1.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.22.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.22.1.2.0 = INTEGER: 3
SNMPv2-SMI::enterprises.232.22.1.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.23.1.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.232.23.1.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.232.23.1.3.0 = INTEGER: 1

I can see a repeating pattern here, according to the MIB definition file I found at /opt/compaq/foundation/etc/cmaobjects.mibdef these are similar to the following:

cpqLinOsMibRevMajor 1.3.6.1.4.1.232.23.1.1 INTEGER read-only mandatory
cpqLinOsMibRevMinor 1.3.6.1.4.1.232.23.1.2 INTEGER read-only mandatory
cpqLinOsMibCondition

Seems like the actual useful entries can't be read for some reason.

I'm new to SNMP so all suggestions will be gratefully received!

Thanks,
Shaun Malone
Multimap.com
7 REPLIES 7
Ross Minkov
Esteemed Contributor

Re: net-snmp problem



There is a lot of good info here -- http://net-snmp.sourceforge.net/

try also "man snmp_config"

http://www.unix.org.ua/orelly/networking_2ndEd/snmp/index.htm
Shaun Malone
Occasional Contributor

Re: net-snmp problem

Thanks for the link to to O'Reilly book - that's going to save me TONS of time!

I believe there's something wrong with my SNMP config, particularly the bits relating to the HP SNMP agents.

Will have a look through those links & see if there's anything I can gain from them.

Cheers
Shaun
Thomas Dirs
Frequent Advisor

Re: net-snmp problem

I am not so much of a server head more of a SNMP guy. and from what I see in your output looks OK.

You are walking a table that contains a number of rows. note that your snmp software has cut the standard .1.3.6.1 off the begining as this branch of the tree is always required (it defines the iso structure for snmp)

The mib you are walking has a corresponding mib that is installed on the managment station that will read and interpret all of the different values (Integers in this case but could be octet strings etc).

If you want to script from your command line then you need to understand what each of these values are and incorporate them - These should be fully defined in the management station mib (you might be able to find it at http://www.mibdepot.com else it seems like you alraedy have one so just find the string 232.23.1 and read the explaination)

The values are read only because you should not be able to manually change the temp readings in the mib as it makes no sense. However if you wanted to change a hostname then you would require the set community string (a level higher than read - often termed private)

Make sense?? sorry its probably a little jumbled but should hopefully explain!
Life is for Endurance, not for Enjoyment
Shaun Malone
Occasional Contributor

Re: net-snmp problem

Thanks for your reply, that has cleared up some SNMP stuff in my mind!

The main problem I was having, which I don't think I articulated very well, was that I was expecting additional entries to be listed when doing the snmpwalk.

E.g. the following would very useful for me:

cpqRackPowerSupplyIntakeTemp
1.3.6.1.4.1.232.22.2.5.1.1.1.12

but it didn't appear - i would expect it to show up in the snmpwalk output shown in the message at the top of this thread.

Any further ideas gratefully received!!

Thanks
Shaun
Thomas Dirs
Frequent Advisor

Re: net-snmp problem

First off you initially walked on the 232.23 subset of the mib which will not show you the 232.22 which you describe in your reply. Try walking to this instead

snmpwalk -c public -v 1 localhost 1.3.6.1.4.1.232.22

Moreover you could try doing domething like the following for a specific value:

snmpget -c public -v 1 localhost 1.3.6.1.4.1.232.22.2.5.1.1.1.12

Sometimes depending on the mib you need to put a .0 at the end of the OID as in:

1.3.6.1.4.1.232.22.2.5.1.1.1.12.0

If you cannot "walk" to it and you cannot make a defined "get" to it then the OID does not exist in the SNMP implementation on the device

I know that within a networking environment there is these funky little hidden mib objects that need to be referenced like

snmpwalk -c public@10 -v 1 10.1.1.1

where the @10 means look in a specific subset of the mib. I dont think that this is the case with this mib and would expect it to show on any walk that is done.

Here is a cool link I found which will give you a graphic description

http://www.oidview.com/mibs/232/CPQRACK-MIB.html

If you cannot walk to the 232.22 then your device does not support this subset of the mib.
Life is for Endurance, not for Enjoyment
Thomas Dirs
Frequent Advisor

Re: net-snmp problem

My mistake you walked the whole mib on the device I did not see this first off. still my answer stands...jsut. any confusion let me know!
Life is for Endurance, not for Enjoyment
steven Burgess_2
Honored Contributor

Re: net-snmp problem

Hi Shaun,

Just an additional piece of information for you. If you look at something like a graphical browser

http://www.ireasoning.com/download.shtml

you can actually load the mib into the app, from here you will also get a description of the integers returned, and it may make a little more sense to you. Plus you will see the tree in it's full form and the various branches that hang from the root OID

HTH

Steve
take your time and think things through