]>
Commit | Line | Data |
---|---|---|
18ee158b ER |
1 | Setup |
2 | ~~~~~ | |
3 | ||
4 | To install this template: | |
5 | ||
6 | 1. Start mailgraph, be sure that .rrd files are created in /var/lib/mailgraph, | |
7 | verify permissions if they do not get created. | |
8 | ||
9 | 2. adjust permissions that webserver is able to read the mailgraph .rrd files. | |
10 | ||
11 | 3. Create graph via "New Graphs": | |
12 | select "Postfix Processing (Mailgraph)" for host and hit "Create" | |
13 | ||
14 | 3. Change data templates point to .rrd files: | |
15 | for "Postfix Processing (Mailgraph)" choose /var/lib/mailgraph/mailgraph.rrd | |
16 | for "Postfix Processing Virus (Mailgraph)" choose /var/lib/mailgraph/mailgraph_virus.rrd | |
17 | ||
18 | Enjoy! | |
19 | ||
20 | Multiple graphs | |
21 | ~~~~~~~~~~~~~~~ | |
22 | ||
23 | To collect multiple graphs from different hosts, use syslog to route the mail | |
24 | logs to your cacti host. | |
25 | ||
26 | Use --host=HOST and --logfile and --daemon-rrd=DIR options to combine results | |
27 | for your needs. | |
28 | ||
29 | You could even merge results from mailhost1 and mailhost2 if you write their | |
30 | logs to single file with syslog and do not specify --host argument to | |
31 | mailgraph.pl daemon. | |
d9cf392a ER |
32 | |
33 | for example via syslog-ng: | |
34 | 1. server side (accepting logs): | |
35 | source s_net { udp(); }; | |
36 | filter f_mail { facility(mail); }; | |
37 | destination mail_net { | |
38 | file( | |
39 | "/var/log/mail/$HOST" owner(root) group(http) perm(0640) | |
40 | create_dirs(yes) dir_perm(0710) dir_owner(root) dir_group(http) | |
41 | ); | |
42 | }; | |
43 | log { source(s_net); filter(f_mail); destination(mail_net); }; | |
44 | ||
45 | 2. client side (sending logs): | |
46 | destination maillog { udp("cactihost" port(514)); }; | |
47 | log { source(s_sys); filter(f_mail); destination(maillog); }; |