Operating System - HP-UX
1753544 Members
5956 Online
108795 Solutions
New Discussion

Re: How to config SNMP for hp-ux 11.31

 
NDO
Super Advisor

How to config SNMP for hp-ux 11.31

Hi!

Please can you help me to configure SNMP to be used by another application on port 161? The aim is to monitor CPU, Memory and disk parameters.

Hi have the following files in my hp-ux system:

 

/etc/SnmpAgent.d/snmpd.conf
/etc/snmpd.conf
/usr/newconfig/etc/SnmpAgent.d/snmpd.conf

 

FR

6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: How to config SNMP for hp-ux 11.31

Here's my basic SNMP Recipe:

 

The general steps to configure SNMP are:

1) Edit the /etc/rc.config.d/Snmp* files as appropriate.

SnmpHpunix -- Controls whether the MIB SNMP Subagent is started on bootup. This should be set to 1.

SnmpMaster -- Controls whether the master SNMP daemon (snmpdm) is started at bootup. This should be set to 1.

SnmpMib2 -- Controls whether or not the SNMP Network Management MIB2 agent is started. This should be set to 1.

SnmpTrpDst -- Control whether the trapdest subagent is started. This should be set to 1.

2) Edit the /etc/SnmpAgent.d/snmpd.conf file as appropriate:

This file allows you to set the get-community-name, set-community-name, trap-dest and other parameters.

The main 3 parameters you should set are:

get-community-name -- The default community name is 'public'. This should be set to something different for security purposes. You can also set IP addresses that are allowed to query the get-community string.

set-community-name -- The default community name is usually 'private' but sometimes it is not set at all for security purposes. If needed, this should be set to a value other than 'private' and different from the get-community-name. You can also set IP addresses that are allowed to query the set-community string.

trap-dest -- Specifies the name or IP address that SNMP traps will be sent to. You can have multiple trap-dest configured by adding multiple trap-dest lines.

The snmpd.conf file is well documented with the various options that can be configured in the file. There is also a man page available for snmpd.conf.

Some monitoring servers have a command called 'snmpwalk' that will allow you to query the SNMP Agent on a server and display whatever is available.

A free tool that is available to query SNMP information is GetIF, available from http://www.wtcs.org/snmp4tpc/getif.htm This can be installed on a Windows PC and will allow you to query many different type of devices that are running SNMP.


Patrick Wallek
Honored Contributor

Re: How to config SNMP for hp-ux 11.31

Note that /etc/snmpd.conf is symlink to /etc/SnmpAgent.d/snmpd.conf

 

# ll -d /etc/snmp*
lrwxr-xr-x   1 root       sys             27 Jul 19  2010 /etc/snmpd.conf -> /etc/SnmpAgent.d/snmpd.conf


NDO
Super Advisor

Re: How to config SNMP for hp-ux 11.31

Hi

 

Thank you very much for your reply, I have got all the files that you mentioned and all of them are set to 1 (to start at boot). The snmpd.conf file is also configured as community string as public, but I beleive... I am not quite sure I need to use the snmpwalk command to test, but I do not have this comand:

/etc/rc.config.d #man snmpwalk
No manual entry for snmpwalk.

 

can you help?

 

FR

NDO
Super Advisor

Re: How to config SNMP for hp-ux 11.31

Hi

 

I had to install the net-snmp bundle to get snmpwalk working.

But now I cannot find OIDs for file systems, I did go to www.mibdepot.com, but no luck

 

FR

Matti_Kurkela
Honored Contributor

Re: How to config SNMP for hp-ux 11.31

You'll want the HP-UNIX MIB, which is available at www.mibdepot.com:

http://www.mibdepot.com/cgi-bin/getmib3.cgi?win=mib_a&n=HP-UNIX&t=sum&v=v1&r=hp&f=hp-unix.mib

 

The filesystem information is at 1.3.6.1.2.1.1.1.2, or "iso.org.dod.internet.mgmt.mib-2.system.general.fileSystem".

 

HP also provides a large package of MIB files for HP and other manufacturers here:

http://h18013.www1.hp.com/products/servers/management/hpsim/mibkit.html

 

Once you have the MIB files and have configured the correct MIB file search path to the net-snmp tools, you could view the filesystem information like this:

 

snmptable -v 2c -c public localhost HP-UNIX:fileSystemTable

(You could also use snmpwalk, but since the filesystem information is structured as a table, the "snmptable" tool produces nicer output. Just stretch your terminal window wide enough: about 180 characters wide should be OK.)

 

MK
NDO
Super Advisor

Re: How to config SNMP for hp-ux 11.31

Hi!

 

I have managed to get  a MIB file for HP-UX where there are several OIDs for different parameters to measure, like CPU, Memory, but the ones for file system are not working. I am using PRTG, and I dont know if I have to set in snmpd.conf file a way in which PRTG will read these OIDs for file systems.

Can you help?

 

FR