<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi,<br><br>I use the following config file :<br>And i use this command : /negate -c OK -s /usr/local/libexec/nagios/check_snmp -H 'servernaam
weggehaald' -P 3 -L authPriv -U 'user name wegehaald' -a SHA -A
xxxxx01# -x AES -X xxxxx02# -l 'disk space used per partition' -u '%,%'
-o UCD-SNMP-MIB::dskPercent.2,UCD-SNMP-MIB::dskPercent<br><br>I get this answer : SNMP OK - disk space used per partition *96* % *99* % | disk space used per partition=96 UCD-SNMP-MIB::dskPercent.6=99<br><br>The answer is wrong. Its reversed. I have 96 and 99 % free space not used. How can i make this corect?!<br><br>#----SNMPD.conf-----#<br>
<br>
###############################################################################<br>
#<br>
# EXAMPLE.conf:<br>
# An example configuration file for configuring the Net-SNMP agent ('snmpd')<br>
# See the 'snmpd.conf(5)' man page for details<br>
#<br>
# Some entries are deliberately commented out, and will need to be explicitly activated<br>
#<br>
###############################################################################<br>
#<br>
# AGENT BEHAVIOUR<br>
#<br>
<br>
# Listen for connections from the local system only<br>
#agentAddress udp:127.0.0.1:161<br>
# Listen for connections on all interfaces (both IPv4 *and* IPv6)<br>
agentAddress udp:161,udp6:[::1]:161<br>
<br>
<br>
###############################################################################<br>
#<br>
# SNMPv3 AUTHENTICATION<br>
#<br>
# Note that these particular settings don't actually belong here.<br>
# They should be copied to the file /var/net-snmp/snmpd.conf<br>
# and the passwords changed, before being uncommented in that file *only*.<br>
# Then restart the agent<br>
<br>
# createUser authOnlyUser MD5 "remember to change this password"<br>
# createUser authPrivUser SHA "remember to change this one too" DES<br>
# createUser internalUser MD5 "this is only ever used internally, but still change the password"<br>
<br>
# If you also change the usernames (which might be sensible),<br>
# then remember to update the other occurances in this example config file to match.<br>
<br>
<br>
###############################################################################<br>
#<br>
# ACCESS CONTROL<br>
#<br>
<br>
# system + hrSystem groups only<br>
view systemonly included .1.3.6.1.2.1.1<br>
view systemonly included .1.3.6.1.2.1.25.1<br>
<br>
# Full access from the local host<br>
#rocommunity public localhost<br>
# Default access to basic system info<br>
rocommunity public default -V systemonly<br>
<br>
# Full access from an example network<br>
# Adjust this network address to match your local<br>
# settings, change the community string,<br>
# and check the 'agentAddress' setting above<br>
#rocommunity secret 10.0.0.0/16<br>
<br>
# Full read-only access for SNMPv3<br>
rouser authOnlyUser<br>
# Full write access for encrypted requests<br>
# Remember to activate the 'createUser' lines above<br>
#rwuser authPrivUser priv<br>
<br>
# It's no longer typically necessary to use the full 'com2sec/group/access' configuration<br>
# r[ou]user and r[ow]community, together with suitable views, should cover most requirements<br>
<br>
<br>
###############################################################################<br>
#<br>
# SYSTEM INFORMATION<br>
#<br>
<br>
# Note that setting these values here, results in the corresponding MIB objects being 'read-only'<br>
# See snmpd.conf(5) for more details<br>
sysLocation Sitting on the Dock of the Bay<br>
sysContact Me <me@example.org><br>
# Application + End-to-End layers<br>
sysServices 72<br>
<br>
<br>
#<br>
# Process Monitoring<br>
#<br>
# At least one 'mountd' process<br>
proc mountd<br>
# No more than 4 'ntalkd' processes - 0 is OK<br>
proc ntalkd 4<br>
# At least one 'sendmail' process, but no more than 10<br>
proc sendmail 10 1<br>
<br>
# Walk the UCD-SNMP-MIB::prTable to see the resulting output<br>
# Note that this table will be empty if there are no "proc" entries in the snmpd.conf file<br>
<br>
<br>
#<br>
# Disk Monitoring<br>
#<br>
# 10MBs required on root disk, 5% free on /var, 10% free on all other disks<br>
disk / 10000<br>
disk /var 5%<br>
includeAllDisks 10%<br>
<br>
# Walk the UCD-SNMP-MIB::dskTable to see the resulting output<br>
# Note that this table will be empty if there are no "disk" entries in the snmpd.conf file<br>
<br>
<br>
#<br>
# System Load<br>
#<br>
# Unacceptable 1-, 5-, and 15-minute load averages<br>
load 12 10 5<br>
<br>
# Walk the UCD-SNMP-MIB::laTable to see the resulting output<br>
# Note that this table *will* be populated, even without a "load" entry in the snmpd.conf file<br>
<br>
<br>
###############################################################################<br>
#<br>
# ACTIVE MONITORING<br>
#<br>
<br>
# send SNMPv1 traps<br>
trapsink localhost public<br>
# send SNMPv2c traps<br>
#trap2sink localhost public<br>
# send SNMPv2c INFORMs<br>
#informsink localhost public<br>
<br>
# Note that you typically only want *one* of these three lines<br>
# Uncommenting two (or all three) will result in multiple copies of each notification.<br>
<br>
<br>
#<br>
# Event MIB - automatically generate alerts<br>
#<br>
# Remember to activate the 'createUser' lines above<br>
iquerySecName internalUser <br>
rouser internalUser<br>
# generate traps on UCD error conditions<br>
defaultMonitors yes<br>
# generate traps on linkUp/Down<br>
linkUpDownNotifications yes<br>
<br>
<br>
###############################################################################<br>
#<br>
# EXTENDING THE AGENT<br>
#<br>
<br>
#<br>
# Arbitrary extension commands<br>
#<br>
extend test1 /bin/echo Hello, world!<br>
extend-sh test2 echo Hello, world! ; echo Hi there ; exit 35<br>
#extend-sh test3 /bin/sh /tmp/shtest<br>
<br>
# Note that this last entry requires the script '/tmp/shtest' to be created first,<br>
# containing the same three shell commands, before the line is uncommented<br>
<br>
# Walk the NET-SNMP-EXTEND-MIB tables (nsExtendConfigTable, nsExtendOutput1Table<br>
# and nsExtendOutput2Table) to see the resulting output<br>
<br>
# Note that the "extend" directive supercedes the previous "exec" and "sh" directives<br>
# However, walking the UCD-SNMP-MIB::extTable should still returns the same output,<br>
# as well as the fuller results in the above tables.<br>
<br>
<br>
#<br>
# "Pass-through" MIB extension command<br>
#<br>
#pass .1.3.6.1.4.1.8072.2.255 /bin/sh PREFIX/local/passtest<br>
#pass .1.3.6.1.4.1.8072.2.255 /usr/bin/perl PREFIX/local/passtest.pl<br>
<br>
# Note that this requires one of the two 'passtest' scripts to be installed first,<br>
# before the appropriate line is uncommented.<br>
# These scripts can be found in the 'local' directory of the source distribution,<br>
# and are not installed automatically.<br>
<br>
# Walk the NET-SNMP-PASS-MIB::netSnmpPassExamples subtree to see the resulting output<br>
<br>
<br>
#<br>
# AgentX Sub-agents<br>
#<br>
# Run as an AgentX master agent<br>
master agentx<br>
# Listen for network connections (from localhost)<br>
# rather than the default named socket /var/agentx/master<br>
#agentXSocket tcp:localhost:705<br> </div></body>
</html>