Baka
Menu

Graphing mail statistics trends

Client-side plugin for graphing mail statistics from mail.log
Supported loglines: postfix, ssmtp, nullmailer, postgrey, amavis, spamd.

Installation:
 

Client-side:
Download and copy mailgraph.sh to xymon ext directory.
Create new file /etc/xymon/clientlaunch.d/mailgraph.cfg:
Note: read permissions for mail.log file required for xymon user.

 

Server-side:
Add "mailgraph=ncv" to TEST2RRD variable and "mailgraph" to GRAPHS variable in xymonserver.cfg.
Add the line "NCV_mailgraph="runtime:GAUGE,*:ABSOLUTE" to xymonserver.cfg.
Create new file /etc/xymon/graphs.d/mailgraph.cfg and add a few lines to rrddefinitions.cfg:

Add line to xymonserver.cfg


GRAPHS_mailgraph="mailgraph,mailgraph-tls-mail,mailgraph-tls-connects,mailgraph-proto-received,mailgraph-proto-sent,mailgraph-local,mailgraph-rejected,mailgraph-amavis,mailgraph-spamd,mailgraph-postgrey,mailgraph-postgrey-passed,mailgraph-loglines,mailgraph-runtime"

 

Restart xymon-server.

Optional:
Define the subgraphs to include in the "trends" column in the host line or .default. line in hosts.cfg.

Example: include all defined subgraphs to trends:

TRENDS:*,mailgraph:mailgraph|mailgraph-rejected|mailgraph-local|mailgraph-amavis|mailgraph-spamd|mailgraph-postgrey|mailgraph-postgrey-passed|mailgraph-loglines|mailgraph-runtime

 

Download

 

Screenshots:

Mailtransport

Rejected mails

Mailtransport local

Amavis

Postgrey

Postgrey passed