Page 1 of 1

Nagios 4 and SNMP

Posted: Thu Dec 11, 2014 6:43 pm
by jabyoz
Hi,

II have the following problem nagios with the plug in check_snmp_dick.pl

from the webpage give me error UNKNOWN "warn < crit if type=pu"

but from the console running it gives me ok .

from the console:

/usr/local/nagios/libexec/check_snmp_storage.pl -H servidor -C publico -m /var/qmail/maildirs -T pu -w %50 -c %90
/var/qmail/maildirs: 16%used(146002MB/914863MB) (<50%) : OK

my conf.

efine service{
use generic-service,graphed-service
host_name Hercules
service_description CHECK DISC
check_command check_snmp_storage!-C publico -m /var/qmail/maildirs -T pu -w 10 -c 15
max_check_attempts 5
check_interval 5
retry_interval 3
check_period 24x7
notification_interval 30
notification_period 24x7
notification_options w,c,r
contact_groups admins
}


service in commands.cfg

# 'check_snmp_storage' command definition
define command {
command_name check_snmp_storage
command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C $ARG1$ -m $ARG2$ -w $ARG3$ -c $ARG4$
}


Thks!

Re: Nagios 4 and SNMP

Posted: Fri Dec 12, 2014 3:34 pm
by tmcdonald
You need to split up your command arguments. Currently with those configs, this is the command you would be running:

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage.pl -H <ip address> -C -C publico -m /var/qmail/maildirs -T pu -w 10 -c 15 -m -w -c
So you need to change your service check_command to:

Code: Select all

check_snmp_storage!publico!/var/qmail/maildirs -T pu!10%!15%
See if that helps. Note you also need to add the percentage signs.