check_mailq exim patch and instructions...
Shaun.Reitan [at] NDCHost.com
Shaun.Reitan at NDCHost.com
Fri Oct 3 08:01:36 CEST 2003
I wanted check_mailq to work with exim and a quick modification to the code
was all that was needed. I was unable to find any info on this but it
works. Let me know if theres any questions/problems.
INSTRUCTIONS
1. touch /usr/bin/mailq
2. echo -e '#!/bin/sh\n/usr/sbin/exim -bpc' > /usr/bin/mailq
3. cd /usr/local/nagios/libexec
4. touch check_mailq.patch
5. Copy and paste the code below into this file
6. patch -p0 < check_mailq.patch
7. dont forget to edit utils.pm and set the mailq path to /usr/bin/mailq
-------------------PATCH CUT BELOW-----------------------------
--- check_mailq Thu Oct 2 22:29:18 2003
+++ check_mailq.eximpatch Thu Oct 2 22:32:33 2003
@@ -67,9 +67,8 @@
# only first line is relevant in this iteration.
while (<MAILQ>) {
- if (/mqueue/) {
print "$utils::PATH_TO_MAILQ = $_ "if $verbose ;
- if (/empty/ ) {
+ if (/0/ ) {
$msg = "OK: mailq is empty";
$msg_q = 0;
$state = $ERRORS{'OK'};
@@ -89,7 +88,6 @@
$state = $ERRORS{'CRITICAL'};
}
- }
last;
}
--------------------END CUT---------------------------------------
--
Best Regards,
Shaun Reitan
Account Specialist
www.NDCHost.com
www.cPlicensing.net
--
Best Regards,
Shaun Reitan
Account Specialist
www.NDCHost.com
www.cPlicensing.net
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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