Page 1 of 1

check_snmp_process.pl Error

Posted: Sun Apr 12, 2015 3:15 am
by sureshkraj2012
Hello,

I am trying to monitor some service (httpd, ssh) / process through Linux SNMP monitoring
But, seeing below error. Please help me to understand what I am missing here

[root@nagios1 ~]# /usr/local/nagios/libexec/check_snmp_process.pl -H server1.domain.com -C l7 --v2c -n httpd -w 3 -c 1 -v

3 1 0 0
Alarm at 15
ERROR: Process name table : Requested table is empty or does not exist.

For the same server, getting response for swap check which uses different plugin

COMMAND: /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H server1.domain.com -C l7 --v2c -m 'Swap' -w 80 -c 90 -f
OUTPUT: Swap space: 10%used(199MB/2048MB) (<80%) : OK | 'Swap_space'=199MB;1638;1843;0;2048

Re: check_snmp_process.pl Error

Posted: Mon Apr 13, 2015 2:01 am
by Box293
sureshkraj2012 wrote:I am trying to monitor some service (httpd, ssh) / process through Linux SNMP monitoring
For the host that is being monitored, can you please post the /etc/snmp/snmpd.conf file.

Re: check_snmp_process.pl Error

Posted: Wed Apr 29, 2015 7:58 pm
by sureshkraj2012
Sorry for the delayed response. Here is the snmpd conf file info

Code: Select all

[admin@test1 ~]$ cat /etc/snmp/snmpd.conf
###############################################################################
#
snmpd.conf:
#
###############################################################################
####
map the community name "public" into a "security name"
sec.name source community
#com2sec localsec localhost public
#com2sec subnetsec 192.168.22.0/24 testingonly
#com2sec localsec localhost l7
#com2sec subnetsec 192.168.33.0/24 l7
#com2sec localsec 192.168.211.132 public
#com2sec localsec localhost public
#com2sec subnetsec 192.168.1.0/24 public
com2sec localsec 192.168.17.250 l7
com2sec localsec 10.150.131.52 17
com2sec localsec localhost l7
#com2sec subnetsec 192.168.1.0/24 l7
####
map the security name into a group name:
groupName securityModel securityName
group notConfigGroup v1 localsec
group notConfigGroup v2c localsec
group notConfigGroup v1 subnetsec
group notConfigGroup v2c subnetsec
####
view to let the group have rights to:
Make at least snmpwalk -v 1 localhost -c public system fast again.
name incl/excl subtree mask(optional)
#view systemview included .1.3.6.1.2.1.1
#view systemview included .1.3.6.1.2.1.25.1.1
#view systemview included .1.3.6.1.4.1.17304.7
name incl/excl subtree mask(optional)
Present entire "system.*" tree from SNMPv2-MIB (.1.3.6.1.2.1.1)
view systemview included system
Present host.hrSystem.hrSystemUptime from HOST-RESOURCES-MIB (.1.3.6.1.2.1.25.1.1)
#view systemview included host.hrSystem.hrSystemUptime
#view systemview included host.hrSystem.hrSystemUptime
Present extended MIB from UCD-SNMP-MIB (.1.3.6.1.4.1.2021)
view systemview included enterprises.ucdavis
#view systemview included enterprises.ucdavis.dskTable
#view systemview included enterprises.ucdavis.fileTable
#view systemview included enterprises.ucdavis.laTable
#view systemview included enterprises.ucdavis.logMatch
#view systemview included enterprises.ucdavis.memory
#view systemview included enterprises.ucdavis.prTable
#view systemview excluded enterprises.ucdavis.snmperrs
#view systemview included enterprises.ucdavis.systemStats
view systemview excluded enterprises.ucdavis.ucdExperimental
#view systemview excluded enterprises.ucdavis.version
Present L7 MIB
view systemview included .1.3.6.1.4.1.17304
added in order to present snmpstatus, snmpnetstat -i, and snmpdf info
view systemview included .1.3.6.1.2.1.2
view systemview included .1.3.6.1.2.1.4
view systemview included .1.3.6.1.2.1.25.2
added in order to present enterprises.ucdavis.ucdExperimental.ucdDiskIOMIB
view systemview included .1.3.6.1.4.1.2021.13.15.1.1
####
grant the group read-only access to the systemview view.
group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact systemview none none
access notConfigGroup "" any noauth exact all none none
###############################################################################
Traps and v2 traps enabled and feels to localhost
command host to manage community
#trapcommunity l7
#trapsink app1-seh.l7tech.com l7
#trap2sink app1-seh.l7tech.com l7
###############################################################################
System contact information
#
It is also possible to set the sysContact and sysLocation system
variables through the snmpd.conf file:
syslocation BRM04 IBIS Room
syscontact Root <[email protected]>
###############################################################################
Process checks.
#
The following are examples of how to use the agent to check for
processes running on the host. The syntax looks something like:
#
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.
#
Examples (commented out by default):
#
Make sure java is running
proc java
make sure nmbd is also running
#proc nmbd
proc mysqld_safe [MAX=1] [MIN=1]
-----------------------------------------------------------------------------
###############################################################################
Executable for service usage
#
#pass .1.3.6.1.4.1.17304.7 /bin/sh /ssg/bin/serviceStats.sh
#pass .1.3.6.1.4.1.17304.7 /bin/sh /ssg/appliance/bin/passServiceUsage.sh
#pass .1.3.6.1.4.1.17304.7 /bin/sh /opt/SecureSpan/Appliance/bin/passServiceUsage.sh
pass .1.3.6.1.4.1.17304.7 /bin/sh /opt/SecureSpan/Appliance/bin/passTacticalServiceUsage.sh
-----------------------------------------------------------------------------
Executable for DISKIO as RHE net-snmp doesn't include ucd-diskio-mib
script from http://spacepants.org/blog/net-snmp-linux-diskio-collector-3
MANUAL USAGE: snmp-diskio-collector <action> <OID>
<action> '-g' for get
'-n' for get next
'-s' for set (does nothing for these read-only values)
<OID> .1.3.6.1.4.1.2021.13.15.1.1.x.x
pass .1.3.6.1.4.1.2021.13.15 /usr/local/bin/snmp-diskio-collector
###############################################################################
disk checks
#
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.
Default value = 100000.
Check the / partition and make sure it contains at least 10 megs.
disk / 10000
-----------------------------------------------------------------------------
###############################################################################
load average checks
#
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.
Check for loads:
load 12 14 14
-----------------------------------------------------------------------------
Added for support of bcm5820 cards. ?
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
#------------------------------------------------------------------------------
Monitoring Agent for SNMP Traps
#trapcommunity l7
#trapsink app1-seh.l7tech.com l7
#trap2sink app1-seh.l7tech.com l7
#informsink app1-seh.l7tech.com l7
#agentSecName internal
#rouser internal
#monitor -r 10 -u internal -o dskPath -o dskErrorMsg "dskTable" dskErrorFlag != 0
#monitor -r 10 -u internal -o prNames -o prErrMessage "prTable" prErrorFlag != 0
#monitor -r 10 -u internal -o memErrorName -o memSwapErrorMsg "memory" memSwapError != 0
#monitor -r 10 -u internal -o extNames -o extOutput "extTable" extResult != 0
#monitor -r 10 -u internal -o laNames -o laErrMessage "laTable" laErrorFlag != 0
#monitor -r 10 -u internal -o fileName -o fileErrorMsg "fileTable" fileErrorFlag != 0

Re: check_snmp_process.pl Error

Posted: Thu Apr 30, 2015 10:46 am
by Box293
So you have a restrictive config which is preventing certain OID's from being returned.

In your /etc/snmp/snmpd.conf, this line will relax the restrictions, add it at about line 53

Code: Select all

view systemview included .1.3.6.1
Then restart snmpd

Code: Select all

service snmpd restart
Now it should work for you.