Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_eximailqueue

Rating
7 votes
Favoured:
0
Hits
102960
Files:
FileDescription
check_eximailqueue.txtcheck_eximailqueue script
check_eximailqueue_1.1v1.1 - sudo support
check_eximailqueue_1.2check_eximailqueue_1.2
check_eximailqueue_1.3check_eximailqueue_1.3
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Nagios plugin (script) to check the status of an exim mail queue.
Nagios plugin (script) to check the status of an exim mail queue. This script has been designed and written for the lowest common denominator of shells (sh), requiring only the exim executable as an external program; please note the path to the exim executable is easily changed by editing the variable at the top of the script.

Note that this script has been written on and tested with Solaris 9/10 but should work fine on any other *nix.

Note also, depending on your config, the nagios user will probably be needed to be added to the exim group on the machine you are checking for this script to function correctly. If the script is not run with rights to access the mail queue it will return the following "Mailqueue WARNING - query returned no output!"

New version updated to work with sudo, note that if you are running a system without sudo, version 1.1 will not work! You will also need to add the following to the /etc/sudoers file: "nagios ALL=NOPASSWD:/usr/local/exim/bin/exim" (also see comment at the top of the script).

CHANGELOG
1.0 - Initial release
1.1 - Some tweaks and sudo support
1.2 - Fixed bug in critical/warning level checking which could result in erroneous results.
1.3 - GPLv3 licence
Reviews (7)
hi

/usr/local/nagios/libexec/check_nrpe -H IPaddress -c check_eximmailqueue
Mailqueue WARNING - query returned no output!
--
how can i solve this warning ?

please help me.
first time execute check_eximailqueue_1.3, will appear this error :
./check_eximailqueue_1.3: line 36: /usr/local/nagios/libexec/utils.sh: No such file or directory
Mailqueue WARNING - query returned no output!

=> it means you need to :
1. modify your path on
. /usr/local/nagios/libexec/utils.sh to your own directory. for me, it is on /usr/lib64/nagios/plugins/utils.sh

2. modify path on
EXIM=/usr/local/exim/bin/exim
for me, it is on EXIM=/usr/sbin/exim

its done!
I added this on a server and it working fine on that server. when I tried to check this plugin from the nagios server(remote) i got the following error.
--
# /usr/local/nagios/libexec/check_nrpe -H IPaddress -c check_eximmailqueue
Mailqueue WARNING - query returned no output!
--
added in /etc/sudoers file and all. Could anyone please help me.
The script fails for me, like others, with no response. This is due to the hard-coding of exim's location, which is incorrect on cPanel servers and probably other servers too:

I commented out the EXIM= line:

# default hard-coded # EXIM=/usr/local/exim/bin/exim


and replaced it with one that checks the location of exim:

EXIM=$(which exim)


and now the script works
bykreitje, August 30, 2012
When using with NRPE you need to comment out the Defaults requiretty line in the sudoers file.
byrafaelvolpeti, July 12, 2012
I Got the same error: Mailqueue WARNING - query returned no output! when run remotely.

Anyone can help to solve this?

Regards.
byahmedali, November 30, 2011
0 of 1 people found this review helpful
I get this error when I run the check using nrpe Mailqueue WARNING - query returned no output!

This is what I run
check_nrpe -H $HOSTADDRESS$ -c check_eximailqueue -a '-w 7000 -c 10000'