Patrick Proy's Plugins // SNMP Check I am facing l probl


#1

Dear Friends
I was able to configure nagios , nagiosgraph , now I am working on the Patrick Proy’s Plugins SNMP plugins
I had installed and enabled net-snmp-utils , now when I run the scripts I had downloaded from the command mode I get these errors

[root@john snmp]# ./check_snmp_storage.pl -H 127.0.0.1 -C public -m zzzz -w 80 -c 81 -v
Alarm at 15
ERROR: Description table : Requested table is empty or does not exist.
[root@john snmp]#

[root@john snmp]#
[root@john snmp]# ./check_snmp_process.pl -H 127.0.0.1 -C public -n http
ERROR: Process name table : Requested table is empty or does not exist.
[root@john snmp]# ./check_snmp_process.pl -H 192.168.20.99 -C public -n http
ERROR: Process name table : Requested table is empty or does not exist.
[root@john snmp]# ./check_snmp_process.pl -H 192.168.20.226 -C public -n http
ERROR: Process name table : Requested table is empty or does not exist.
[root@john snmp]#

[root@john snmp]# ./check_snmp_load.pl -H 127.0.0.1 -C public -w 98% -c 99%
ERROR: Description table : Requested table is empty or does not exist.
[root@john snmp]# ./check_snmp_load.pl -H 192.168.20.99 -C public -w 98% -c 99%
ERROR: Description table : Requested table is empty or does not exist.
[root@john snmp]#

[root@john snmp]# ./check_snmp_mem.pl -H 192.168.20.99 -C public -w 99,20 -c 100,30
ERROR: netsnmp : Received noSuchName(2) error-status at error-index 4.
[root@john snmp]#
[root@john snmp]# ./check_snmp_mem.pl -H 127.0.0.1 -C public -w 99,20 -c 100,30
ERROR: netsnmp : Received noSuchName(2) error-status at error-index 4.
[root@john snmp]#

192.168.20.99 is the IP address of my machine

When I do snmpwalk -v 1 127.0.0.1 -c public system
I get these results

[root@john snmp]# snmpwalk -v 1 john -c public system
SNMPv2-MIB::sysDescr.0 = STRING: Linux john.test.com 2.6.9-5.EL #1 Wed Jan 5 19:22:18 EST 2005 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (920111) 2:33:21.11
SNMPv2-MIB::sysContact.0 = STRING: Root root@localhost (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: john.test.com
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.4 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.5 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.6 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.7 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.9 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module to describe generic objects for network interface sub-layers
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.7 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.8 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.9 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (3) 0:00:00.03


when I do a snmpd -H I get
[root@john snmp]# snmpd -H
Configuration directives understood:
No log handling enabled - turning on stderr logging
In snmpd.conf and snmpd.local.conf:
authtrapenable 1 | 2 (1 = enable, 2 = disable)
trapsink host [community] [port]
trap2sink host [community] [port]
informsink host [community] [port]
trapsess [snmpcmdargs] host
trapcommunity community-string
agentuser userid
agentgroup groupid
agentaddress SNMP bind address
quit (1|yes|true|0|no|false)
leave_pidfile (1|yes|true|0|no|false)
injectHandler injectHandler NAME INTONAME [BEFORE_OTHER_NAME]
table tableoid
add_row indexes… values…
com2sec name IPv4-network-address[/netmask] community
com2sec6 name IPv6-network-address[/netmask] community
com2secunix name sockpath community
sysdescr description
syslocation location
syscontact contact-name
sysname node-name
sysservices NUMBER
sysobjectid OID
interface name type speed
group name v1|v2c|usm|… security
access name context model level prefx read write notify
view name type subtree [mask]
rwcommunity community [default|hostname|network/bits [oid]]
rocommunity community [default|hostname|network/bits [oid]]
rwcommunity6 community [default|hostname|network/bits [oid]]
rocommunity6 community [default|hostname|network/bits [oid]]
rwuser user [noauth|auth|priv [oid]]
rouser user [noauth|auth|priv [oid]]
swap min-avail
proc process-name [max-num] [min-num]
procfix process-name program [arguments…]
pass miboid command
pass_persist miboid program
disk path minspace | minpercent% ]
includeAllDisks minpercent%
load max1 [max5] [max15]
exec [miboid] name program arguments
sh [miboid] name program-or-script arguments
execfix exec-or-sh-name program [arguments…]
file file [maxsize]
dlmod module-name module-path
proxy [snmpcmd args] host oid [remoteoid]
logmatch logmatch name path cycletime regex
createUser username (MD5|SHA) passphrase [DES [passphrase]]
override -rw] mibnode type value
storageUseNFS 1 | 2 (1 = enable, 2 = disable)
ignoredisk name
smuxpeer OID-IDENTITY PASSWORD
smuxsocket SMUX bind address
master specify ‘agentx’ for AgentX support
agentxsocket AgentX bind address
agentxperms AgentX socket permissions: socket_perms [directory_perms [username|userid [groupname|groupid]]]
agentxRetries AgentX Retries
agentxTimeout AgentX Timeout (seconds)
engineID string
engineIDType num
engineIDNic string
In snmp.conf and snmp.local.conf:
doDebugging (1|0)
debugTokens token,token…]
logTimestamp (1|yes|true|0|no|false)
mibdirs [mib-dirs|+mib-dirs]
mibs [mib-tokens|+mib-tokens]
mibfile mibfile-to-read
showMibErrors (1|yes|true|0|no|false)
strictCommentTerm (1|yes|true|0|no|false)
mibAllowUnderline (1|yes|true|0|no|false)
mibWarningLevel integerValue
mibReplaceWithLatest (1|yes|true|0|no|false)
printNumericEnums (1|yes|true|0|no|false)
printNumericOids (1|yes|true|0|no|false)
escapeQuotes (1|yes|true|0|no|false)
dontBreakdownOids (1|yes|true|0|no|false)
quickPrinting (1|yes|true|0|no|false)
numericTimeticks (1|yes|true|0|no|false)
oidOutputFormat integerValue
suffixPrinting integerValue
extendedIndex (1|yes|true|0|no|false)
printHexText (1|yes|true|0|no|false)
printValueOnly (1|yes|true|0|no|false)
dontPrintUnits (1|yes|true|0|no|false)
dumpPacket (1|yes|true|0|no|false)
reverseEncodeBER (1|yes|true|0|no|false)
defaultPort integerValue
defCommunity string
noTokenWarnings (1|yes|true|0|no|false)
noRangeCheck (1|yes|true|0|no|false)
persistentDir string
tempFilePattern string
noDisplayHint (1|yes|true|0|no|false)
16bitIDs (1|yes|true|0|no|false)
clientaddr string
defSecurityModel string
defSecurityName string
defContext string
defPassphrase string
defAuthPassphrase string
defPrivPassphrase string
defVersion 1|2c|3
defAuthType MD5|SHA
defPrivType DES (AES support not available)
defSecurityLevel noAuthNoPriv|authNoPriv|authPriv
[root@john snmp]#

                      Please guide me where I had gone wrong 
                                        Thanks 
                                             Joseph John

#2

I am setting up nagiosgraph.now. ; /

for the snmp plugins, start with an easy one.
check_snmp_int.pl

open a window on /var/log/messages tail -f
restart snmpd and make sure that it is actually starting up

go to /usr/local/nagios/libexec and run the plugin from command line mode
./check_snmp_int.pl -H boxname -C snmpsecret -n

-> the out put should be interfaces from the target host.

also the snmp tutorial is worth having a look at.
net-snmp.org/tutorial/tutorial-5/ [hyperlink url](hyperlink url)


#3

The problem is because the file check_snmp_storage.pl has not execution permisses.