Solaris - monitoring processes

"Keith Salter" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I'm trying to get net-snmp monitoring processes on a solaris 8 box. I tried the binary install available from sunfreeware. Net-snmp worked fine, I could view the processes etc. from my snmp manager console.

However when using the proc keyword in snmpd.conf to monitor a specific process it didn't work, no traps were generated.

So I posted here and was advised that there was a problem with this setup on Solaris and that it was fixed but the poster (I think it was Robert Story, search for "solaris monitoring a process woes" on this list) couldn't remember which version it was fixed in. So I compiled version 5.2.2pre1 (which believe me is no mean feat - I may send in my tips for the solaris.README) and tried again - no joy. The same thing happens, I don't receive traps.

The process error flag does get changed when the process is not running but I don't get a trap.

# /etc/init.d/xntpd start
# snmpget -v 2c -c SystemsM localhost prErrorFlag.1
UCD-SNMP-MIB::prErrorFlag.1 = INTEGER: 0
# /etc/init.s/xntpd stop
# snmpget -v 2c -c SystemsM localhost prErrorFlag.1
UCD-SNMP-MIB::prErrorFlag.1 = INTEGER: 1

Here's my snmpd.conf file :

###########################################################################
#
# snmpd.conf
#
# - created by the snmpconf configuration program
#
###########################################################################
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.

# rouser: a SNMPv3 read-only user
# arguments: user [noauth|auth|priv] [restriction_oid]

#rouser SystemsM auth

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
# arguments: community [default|hostname|network/bits] [oid]

rwcommunity SystemsM 10.10.128.147
rwcommunity SystemsM 127.0.0.1

###########################################################################
# SECTION: Monitor Various Aspects of the Running Host
#
# The following check up on various aspects of a host.
agentSecName keith
rouser keith
#defaultMonitors yes

# proc: Check for processes that should be running.
# proc NAME [MAX=0] [MIN=0]
#
# NAME: the name of the process to check for. It must match
# exactly (ie, http will not find httpd processes).
# MAX: the maximum number allowed to be running. Defaults to 0.
# MIN: the minimum number to be running. Defaults to 0.
#
# The results are reported in the prTable section of the UCD-SNMP-MIB tree
# Special Case: When the min and max numbers are both 0, it assumes
# you want a max of infinity and a min of 1.

proc xntpd 1 1

monitor -r 30 -i -u SystemsM -o prNames.1 -o prErrMessage.1 "Process xntpd" prErrorFlag.1 != 0

# disk: Check for disk space usage of a partition.
# The agent can check the amount of available disk space, and make
# sure it is above a set limit.
#
# disk PATH [MIN=100000]
#
# PATH: mount path to the disk in question.
# MIN: Disks with space below this value will have the Mib's errorFlag set.
# Can be a raw byte value or a percentage followed by the %
# symbol. Default value = 100000.
#
# The results are reported in the dskTable section of the UCD-SNMP-MIB tree

disk / 50%

# load: Check for unreasonable load average values.
# Watch the load average levels on the machine.
#
# load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
#
# 1MAX: If the 1 minute load average is above this limit at query
# time, the errorFlag will be set.
# 5MAX: Similar, but for 5 min average.
# 15MAX: Similar, but for 15 min average.
#
# The results are reported in the laTable section of the UCD-SNMP-MIB tree

load 12.0 12.0 12.0

###########################################################################
# SECTION: System Information Setup
#
# This section defines some of the information reported in
# the "system" mib group in the mibII tree.

# syslocation: The [typically physical] location of the system.
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysLocation.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: location_string

syslocation "L spur"

# syscontact: The contact information for the administrator
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysContact.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: contact_string

syscontact "Systems Management"

###########################################################################
# SECTION: Trap Destinations
#
# Here we define who the agent will send traps to.

# trapsink: A SNMPv1 trap receiver
# arguments: host [community] [portnum]

#trapsink 10.10.128.147 SystemsM 161

# trap2sink: A SNMPv2c trap receiver
# arguments: host [community] [portnum]

trap2sink 10.10.128.147 SystemsM 161

# informsink: A SNMPv2c inform (acknowledged trap) receiver
# arguments: host [community] [portnum]

#informsink 10.10.128.147 SystemsM 161

# trapcommunity: Default trap sink community to use
# arguments: community-string

trapcommunity SystemsM

Is anyone successfully monitoring single processes on Solaris 8 with Net-snmp?

Lycos email has now 300 Megabytes of free storage... Get it now at mail.lycos.co.uk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.