check_mailq for postfix
Subhendu Ghosh
sghosh at sghosh.org
Fri Oct 17 00:20:11 CEST 2003
Of course it might be useful to know your postfix version and the plugin
version for this diff :(
check_mailq v 1.4 supports sendmail/qmail/postfix ....
-sg
On Thu, 16 Oct 2003, Yanek Korff wrote:
>
> I don't know if anyone's done this before, but here's a hackjob diff of
> check_mailq that works for the version of postfix I'm running. May it
> fare so well in your environment.
>
> --- /home/users/ykorff/check_mailq Thu Oct 16 17:00:31 2003
> +++ check_mailq Thu Oct 16 16:57:13 2003
> @@ -66,15 +66,17 @@
> }
>
> # only first line is relevant in this iteration.
> +$verbose = 1;
> while (<MAILQ>) {
> - if (/mqueue/) {
> + if (/empty/ ) {
> + $msg = "OK: mailq is empty";
> + $msg_q = 0;
> + $state = $ERRORS{'OK'};
> + }
> + elsif (/Requests/) {
> print "$utils::PATH_TO_MAILQ = $_ "if $verbose ;
> - if (/empty/ ) {
> - $msg = "OK: mailq is empty";
> - $msg_q = 0;
> - $state = $ERRORS{'OK'};
> - }elsif ( /(\d+)/ ) {
> - $msg_q = $1 ;
> + if ( /(\d+) Kbytes in (\d+)/ ) {
> + $msg_q = $2 ;
>
> print "msg_q = $msg_q warn=$opt_w crit=$opt_c\n"
> if $verbose;
>
>
> ----------------------------------------------------------------------------
> This electronic message transmission contains information that may be
> confidential or privileged. The information contained herein is intended
> solely for the recipient and use by any other party is not authorized. If
> you are not the intended recipient (or otherwise authorized to receive this
> message by the intended recipient), any disclosure, copying, distribution or
> use of the contents of the information is prohibited. If you have received
> this electronic message transmission in error, please contact the sender by
> reply email and delete all copies of this message. Cigital, Inc. accepts no
> responsibility for any loss or damage resulting directly or indirectly from
> the use of this email or its contents.
> Thank You.
> ----------------------------------------------------------------------------
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> 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
>
--
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
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