[Nagiosplug-help] check_mailq arbitrary queues

Ugo Bellavance ugob at camo-route.com
Thu Jul 20 19:04:11 CEST 2006


Ugo Bellavance wrote:
> Hi,
> 
> 	I'm a relatively new nagios user and I'm looking for a way to perform a
> check_mailq on arbitrary queues.  What I'd like to be able to do is to
> perform the equivalent of:
> 
> mailq -OQueueDirectory=/var/spool/mqueue
> mailq -OQueueDirectory=/var/spool/mqueue.whatever
> mailq -OQueueDirectory=/var/spool/mqueue.etc
> 
> I looked at the patch to allow the specification of a config file, but
> some of my sendmail processes are called with a "manual" specification
> of the queue.
> 
> I'd be okay with many check_mailq commands (1 for each queue), I'd just
> need a way to override the 'mailq' or 'sendmail' command with 'mailq
> -OQueueDirectory=[...].

Sorry for replying to myself, but I think I found the solution.

I created one new check_mailq file for each queue and edited the open
line (line 72 on my system) and added the argument after the
"utils::PATH_TO_MAILQ" so that it looks like

if (! open (MAILQ, "$utils::PATH_TO_MAILQ
-OQueueDirectory=/var/spool/mqueue.in | " ) ) {

(should be on one line)

Regards,

Ugo





More information about the Help mailing list