From: Israel Garcia on
I have about 20 debian servers send all mail through a loadbalancer
(haproxy) with 2backend smarthosts which send emails to internet. I
have pflogsumm running only on every smarhost. As every smarthost see
on IP source (haproxy) I can not get email stats from every debian
server. Questions: How can I get email stats of my servers in this
scenario?

Thoughts?

NOTE: I can not install pflogsumm on debian servers. I need to solve
my problem on the servers side (haproxy/smarthots)

--
Regards;
Israel Garcia

From: Patrick Ben Koetter on
* Israel Garcia <igalvarez(a)gmail.com>:
> I have about 20 debian servers send all mail through a loadbalancer
> (haproxy) with 2backend smarthosts which send emails to internet. I
> have pflogsumm running only on every smarhost. As every smarthost see
> on IP source (haproxy) I can not get email stats from every debian
> server. Questions: How can I get email stats of my servers in this
> scenario?

Send log from all nodes to a central log server. Use rsyslogd with RELP to get
reliability. Use rsyslog log templates to cut down on bandwidth usage if
Postfix log is to verbose.

p(a)rick




>
> Thoughts?
>
> NOTE: I can not install pflogsumm on debian servers. I need to solve
> my problem on the servers side (haproxy/smarthots)
>
> --
> Regards;
> Israel Garcia

--
All technical questions asked privately will be automatically answered on the
list and archived for public access unless privacy is explicitely required and
justified.

saslfinger (debugging SMTP AUTH):
<http://postfix.state-of-mind.de/patrick.koetter/saslfinger/>

From: Patrick Chemla on
Le 27/04/2010 10:54, Patrick Ben Koetter a �crit :
> * Israel Garcia<igalvarez(a)gmail.com>:
>
>> > I have about 20 debian servers send all mail through a loadbalancer
>> > (haproxy) with 2backend smarthosts which send emails to internet. I
>> > have pflogsumm running only on every smarhost. As every smarthost see
>> > on IP source (haproxy) I can not get email stats from every debian
>> > server. Questions: How can I get email stats of my servers in this
>> > scenario?
>>
> Send log from all nodes to a central log server. Use rsyslogd with RELP to get
> reliability. Use rsyslog log templates to cut down on bandwidth usage if
> Postfix log is to verbose.
>
I am also running a big number of servers. To avoid heavy load on the
network and on the central server processing a huge amount of data, I
wrote a script on each node to extract statistics and send a very small
amount of data to the central server with exactly what I want to monitor.
Then this one as just to generate graphs. I am using munin.
Patrick

From: Israel Garcia on
>>
>> Send log from all nodes to a central log server. Use rsyslogd with RELP to
>> get
>> reliability. Use rsyslog log templates to cut down on bandwidth usage if
>> Postfix log is to verbose.
>>
>
> I am also running a big number of servers. To avoid heavy load on the
> network and on the central server processing a huge amount of data, I wrote
> a script on each node to extract statistics and send a very small amount of
> data to the central server with exactly what I want to monitor.
> Then this one as just to generate graphs. I am using munin.
> Patrick
Hi Patrick,

could you share the script with us?

regards,
Israel.

>



--
Regards;
Israel Garcia

From: Patrick Chemla on
Le 27/04/2010 15:27, Israel Garcia a écrit :
> could you share the script with us?
>
>

You can put whatever you want in the script. I am monitoring different
parts of the servers.

Extract:

# Identify the server by the last digit of his IP
ip3d=`/sbin/ifconfig| grep Bcast|grep 10.0.0|cut -d":" -f2 | cut -d" "
-f1|cut -d"." -f4`

# Get queue stats from qmail
qmailctl stat|grep queue:|awk -vip=$ip3d '{print "qmail a" ip,$NF}' >
/tmp/qstat$ip3d

# Get active queue stats from postfix
find /var/spool/postfix/active -type f|wc -l|awk -vip=$ip3d '{print
"postfix a" ip,$NF}' >> /tmp/qstat$ip3d

##### Add here whatever number you want to send to the server : cpu,
memory, disk space, ....

# Send the file to the central. You can use shared disk. Some of my
servers are remote, so I use scp.
scp /tmp/qstat$ip3d 10.0.0.252:/tmp/muninqstat

Munin has also very powerful specific scripts, but on large architecture
it creates a huge amount of traffic and load both on nodes and server to
update the database. This way, I also use munin, but I split better the
load and I minimize connexions.

On the server side, with grep and awk extract from all qstatXXX files
the data you want to show for each graph, you can generate with whatever
tool. There I do it with a munin script, it's simple.

Patrick