Re: Monitoring Postfix Mail queue with SNMP

2017-03-26 Thread Voytek
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__Postfix_stats_on_Cacti_via_SNMP_/



Re: Monitoring Postfix Mail queue with SNMP

2017-03-18 Thread 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  
> > > 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


Re: Monitoring Postfix Mail queue with SNMP

2017-03-18 Thread 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  
> > 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


Re: Monitoring Postfix Mail queue with SNMP

2017-03-17 Thread Viktor Dukhovni

> On Mar 17, 2017, at 1:06 PM, 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?

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.