1753257 Members
5455 Online
108792 Solutions
New Discussion юеВ

snmp tutorial

 
Don McCulloch
New Member

snmp tutorial

Can someone recommend a smnp reference for HP Proliant ML350. I would like to be able to write simple status scripts. I have experience doing this on other machines. I have read the HP System Management Homepage snmp settings page but still need more help.

Thanks
4 REPLIES 4
Tim Nelson
Honored Contributor

Re: snmp tutorial

typically you would use snmpget on the MIB OIDS of interest and then use the return values to do whatever you would like..

are you looking for something more or different than that ?

e.g. pull basic temp and humidity from LiebertAC unit.

TEMP=`./snmpwalk -v 1 -c community_string liebertac1 .1.3.6.1.4.1.476.1.42.3.4.1.2.3.1.3|awk -F: '{print $3}'`
HUM=`./snmpwalk -v 1 -c community_string liebertac1 .1.3.6.1.4.1.476.1.42.3.4.2.2.3.1.3|awk -F: '{print $3}'`
DATE=`date '+%m/%d/%y %T'`
echo "$DATE|$TEMP|$HUM" >> $OUTFILE
Don McCulloch
New Member

Re: snmp tutorial

Sorry for the delay in replying. I kind of fell off this project, and am trying to get back on and could still use some help.

I can use this command to get drive status information on a HP storage server DL380 :

/usr/bin/snmpwalk -v1 -c public 192.168.200.171 .1.3.6.1.4.1.232.3.2.5.1.1.6.2

This gives drive state information ( 1,ready, 2, failed, 3, online, etc).

But this same oid fails when I run it against a ML350.

I have done much searching on the internet but have not been able to find an equivalent oid to return the drive status information on this ML350.

I have a good bit of experience working with smnp, but this has frustrated me.

Any help would be appreciated.

Matti_Kurkela
Honored Contributor

Re: snmp tutorial

The OIDs .1.3.6.1.4.1.232.* refer to CPQIDA-MIB.

If the ML350 does not have the Proliant-specific SNMP agents installed, that information won't be present.

There are two major types of HP management utilities for Linux: the "old" version and the current one. Both include multiple parts, which all must be present for full functionality.

For the current type, you'll need the following RPMs installed:

- hp-health RPM includes the drivers and command-line tools for querying the basic system health status, and changing some BIOS settings while the system is running

- hp-snmp-agents RPM takes the data provided by the drivers in hp-health RPM and makes them available by SNMP

- hpsmh and hp-smh-templates take the information from the SNMP daemon and provide it to the user with the System Management Homepage web GUI. These will also contain some configuration functions to manage the whole set seamlessly.

The old versions had slightly different RPM names and were split a bit differently:

- the hpasm RPM included both the drivers and the SNMP agents, BUT:

- very old versions of the hpasm RPM required extra packages for NIC and storage agents: the cmanic and cmastor RPMs.

It would have been important to know the generation number of your ML350, and the version numbers of your hardware monitoring RPMs: "dmidecode" can be used to find the full model number, and "rpm -qa | grep -e '^hp' -e '^cma' " should find the version numbers of all the relevant RPMs.

MK
MK
Don McCulloch
New Member

Re: snmp tutorial

Matti

Thanks for your quick reply. I learned alot just from your post. I'll let you know how it goes ....