Monitoring Postfix Mail queue with SNMP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Monitoring Postfix Mail queue with SNMP

Sean Son
Hello all

We would like to monitor Postfix mail queues using SMNP so we can receive alerts whenever the mail queue reaches a certain threshold. What OID and MIB would we have to use to be able to monitor Postfix mail queues?


Thank you for all of your help in this post and other posts of mine!


Sean
Reply | Threaded
Open this post in threaded view
|

Re: Monitoring Postfix Mail queue with SNMP

Viktor Dukhovni

> On Mar 17, 2017, at 1:06 PM, Sean Son <[hidden email]> wrote:
>
> Hello all
>
> We would like to monitor Postfix mail queues using SMNP so we can receive alerts whenever the mail queue reaches a certain threshold. What OID and MIB would we have to use to be able to monitor Postfix mail queues?

I don't recall a specific MIB that covers mail queues, however
I recommend against monitoring the queue's message count, too
many false alarms from spikes in traffic.  What is more useful
to monitor is average time from queue entry to queue exit, and
also average age in the active queue.

See QSHAPE_README and also monitor the "c+d" delay sum from
the "delays=a/b/c/d" log entries (de-duping for multi-recipient
deliveries of a single message).  At prior employer, we computed
a slowly exponentially decaying moving average of the "c+d" times
as indicators of current congestion, and queue age as indicators
of "stuck" messages.

Just counting messages is not terribly useful IMHO.

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: Monitoring Postfix Mail queue with SNMP

Geert Stappers
On Fri, Mar 17, 2017 at 01:25:45PM -0400, Viktor Dukhovni wrote:

> > On Mar 17, 2017, at 1:06 PM, Sean Son <[hidden email]> wrote:
> >
> > Hello all
> >
> > We would like to monitor Postfix mail queues using SMNP so we
> > can receive alerts whenever the mail queue reaches a certain
> > threshold. What OID and MIB would we have to use to be able to
> > monitor Postfix mail queues?
>
> I don't recall a specific MIB that covers mail queues, however
> I recommend against monitoring the queue's message count, too
> many false alarms from spikes in traffic.  What is more useful
> to monitor is average time from queue entry to queue exit, and
> also average age in the active queue.
>
> See QSHAPE_README and also monitor the "c+d" delay sum from
> the "delays=a/b/c/d" log entries (de-duping for multi-recipient
> deliveries of a single message).  At prior employer, we computed
> a slowly exponentially decaying moving average of the "c+d" times
> as indicators of current congestion, and queue age as indicators
> of "stuck" messages.
>
> Just counting messages is not terribly useful IMHO.
>

Is the delay information available in /var/spool/postfix/public/showq ?

So could the info be used by https://github.com/kumina/postfix_exporter ?



Groeten
Geert Stappers
--
Leven en laten leven
Reply | Threaded
Open this post in threaded view
|

Re: Monitoring Postfix Mail queue with SNMP

Wietse Venema
Geert Stappers:

> On Fri, Mar 17, 2017 at 01:25:45PM -0400, Viktor Dukhovni wrote:
> > > On Mar 17, 2017, at 1:06 PM, Sean Son <[hidden email]> wrote:
> > >
> > > Hello all
> > >
> > > We would like to monitor Postfix mail queues using SMNP so we
> > > can receive alerts whenever the mail queue reaches a certain
> > > threshold. What OID and MIB would we have to use to be able to
> > > monitor Postfix mail queues?
> >
> > I don't recall a specific MIB that covers mail queues, however
> > I recommend against monitoring the queue's message count, too
> > many false alarms from spikes in traffic.  What is more useful
> > to monitor is average time from queue entry to queue exit, and
> > also average age in the active queue.
> >
> > See QSHAPE_README and also monitor the "c+d" delay sum from
> > the "delays=a/b/c/d" log entries (de-duping for multi-recipient
> > deliveries of a single message).  At prior employer, we computed
> > a slowly exponentially decaying moving average of the "c+d" times
> > as indicators of current congestion, and queue age as indicators
> > of "stuck" messages.
> >
> > Just counting messages is not terribly useful IMHO.
> >
>
> Is the delay information available in /var/spool/postfix/public/showq ?

Viktor is talking about files that are no longer in the queue.

There is a fundamental difference between queue (current state)
and logging (history).

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Monitoring Postfix Mail queue with SNMP

Voytek
In reply to this post by Sean Son
On Sat, March 18, 2017 4:06 am, Sean Son wrote:
> Hello all
>
>
> We would like to monitor Postfix mail queues using SMNP so we can receive
>  alerts whenever the mail queue reaches a certain threshold. What OID and
>  MIB would we have to use to be able to monitor Postfix mail queues?

Sean,

I use Glen's cacti postfix plugins + cacti threshold plugin for notification

https://www.pitt-pladdy.com/blog/_20091122-164951_0000_Postfix_stats_on_Cacti_via_SNMP_/