check_nrpe 2.0 and simple shell scripting

Frank Thyes thyes at gmx.net
Fri Feb 17 20:29:31 CET 2006


Dear list,
im expieriencing a strange behaviour with check_nrpe in conjunction
with a simple shell script. The script does nothing exceptionally.
The script should check the files which hang around in the
postfic mailq. Sure for this purpose exists a special plugin called
check_mailq, but this plugin just calls the program mailq. Supposed
we have 20k mails in there the command needs a lot of time to
comlete. Its faster to count the files in active and deferred to get
the whole queue. Unfortunately each time i use something like the
example among, the script just return exit code 3, unkonw...

ACTIVE=`find /var/spool/postfix/active/ -type f | wc -l`
..
if [ $AMOUNT -ge 0 ]; then
..

Writing the output from find to a tmp file doesnt work too

/usr/bin/find /var/spool/postfix/active/ -type f > /tmp/active
ACTIVE=`cat /tmp/active| wc -l`

The general functionality has been verified with statical values.

Any ideas?

Regards
Frank

-- 
religion kill humans!


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list