On Tue, 9 Oct 2007, zack kenton wrote: > unfortunately that didnt work...i dont think it needs sudo > privileges...it still returns OK locally, but nrpe gives a critical...
See Marc's reply. > on a side note, did you translate the script out of german? Have a look: --- /usr/lib/nagios/plugins/contrib/check_qmailq.pl 2006-12-12 09:03:29.000000000 -0800 +++ check_qmailq.pl 2007-10-09 10:29:18.000000000 -0700 @@ -27,11 +27,11 @@ ### CONFIGURATION SECTION #################### my $statcommand = "/var/qmail/bin/qmail-qstat"; -my $queuewarn = 5; # Warning, if more than x mail in Queue -my $queuecrit = 10; # Critical if "--" -my $prewarn = 1; # Warning, if more than x unhandled mails +my $queuewarn = 20; # Warning, if more than x mail in Queue +my $queuecrit = 30; # Critical if "--" +my $prewarn = 5; # Warning, if more than x unhandled mails # (not in Queue -my $precrit = 5; # Critical, if "--" +my $precrit = 10; # Critical, if "--" ### CONFIURATION SECTION END ################ @@ -56,12 +56,12 @@ #sub usage { # printf "\nMissing arguments!\n"; # printf "\n"; -# printf "Printer Server Queue Nagios Plugin\n"; -# printf "monitors jobs in lpr queues\n"; +# printf "qmail Queue Nagios Plugin\n"; +# printf "monitors qmail queue\n"; # printf "usage: \n"; -# printf "check_lpq.pl \n"; +# printf "check_qmailq.pl \n"; # printf "Copyright (C) 2000 Benjamin Schmid\n"; -# printf "check_lpq.pl comes with ABSOLUTELY NO WARRANTY\n"; +# printf "check_qmailq.pl comes with ABSOLUTELY NO WARRANTY\n"; # printf "This programm is licensed under the terms of the "; # printf "GNU General Public License\n(check source code for details)\n"; # printf "\n\n"; @@ -70,7 +70,7 @@ # Just in case of problems, let's not hang Nagios $SIG{'ALRM'} = sub { - print ("ERROR: check_lpq.pl Time-Out $TIMEOUT s \n"); + print ("ERROR: check_qmailq.pl Time-Out $TIMEOUT s \n"); exit $ERRORS{"UNKNOWN"}; }; alarm($TIMEOUT); @@ -100,18 +100,21 @@ $state='CRITICAL' if ($anzq >= $queuecrit); } else { $state='CRITICAL'; - $answer="Keine gueltigte Antwort (Zeile #1) von $statcommand\n"; +# $answer="Keine gueltigte Antwort (Zeile #1) von $statcommand\n"; + $answer="No valid answer (Line #1) from $statcommand\n"; } # Unverarbeite Mails if ($lines[1]=~/^messages in queue but not yet preprocessed: (\d+)/) { my $anzp = $1; - $answer = $answer . " E-Mail(s) nicht ausgeliefert, $anzp unverarbeitet."; +# $answer = $answer . " E-Mail(s) nicht ausgeliefert, $anzp unverarbeitet."; + $answer = $answer . " E-Mail(s) not delivered, $anzp unprocessed."; $state='WARNING' if ($anzp >= $prewarn && $state eq 'UNKNOWN'); $state='CRITICAL' if ($anzp >= $precrit); } else { $state='CRITICAL'; - $answer=$answer . "Keine gueltigte Antwort (Zeile #2) von $statcommand\n"; +# $answer=$answer . "Keine gueltigte Antwort (Zeile #2) von $statcommand\n"; + $answer=$answer . "No valid answer (Line #2) from $statcommand\n"; } $state = 'OK' if ($state eq 'UNKNOWN'); ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null