/[smecontribs]/rpms/smeserver-sme9admin/contribs9/smeserver-sme9admin-1.5-bz8818-email_accounting.patch
ViewVC logotype

Annotation of /rpms/smeserver-sme9admin/contribs9/smeserver-sme9admin-1.5-bz8818-email_accounting.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Sat Dec 17 15:49:43 2016 UTC (7 years, 11 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-sme9admin-1_5-30_el6_sme, smeserver-sme9admin-1_5-27_el6_sme, smeserver-sme9admin-1_5-23_el6_sme, smeserver-sme9admin-1_5-21_el6_sme, smeserver-sme9admin-1_5-24_el6_sme, smeserver-sme9admin-1_5-22_el6_sme, smeserver-sme9admin-1_5-20_el6_sme, smeserver-sme9admin-1_5-29_el6_sme, smeserver-sme9admin-1_5-25_el6_sme, smeserver-sme9admin-1_5-28_el6_sme, smeserver-sme9admin-1_5-26_el6_sme, HEAD
Changes since 1.1: +1 -1 lines
* Sat Dec 17 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.5-20.sme
- fix last patch by adding path to called programs

1 unnilennium 1.1 --- smeserver-sme9admin-1.5/root/usr/bin/sme9admind.email 2016-11-24 00:38:09.000000000 +0100
2     +++ smeserver-sme9admin-1.5/root/usr/bin/sme9admind 2016-12-15 19:16:31.000000000 +0100
3     @@ -93,7 +93,8 @@
4     "spamd/current", #pour les SPAMS
5     "sshd/current", #pour les connexions ssh
6     "messages",
7     - "qpsmtpd/current", #pour les mails IN/OUT (RCPT FROM / MAIL TO) et les SPAM/VIRUS ??
8     + "qmail/current", #pour les mails IN/OUT
9     + "qpsmtpd/current", #pour les SPAM/VIRUS ??
10     "sqpsmtpd/current", #idem pour les connexions securisées
11     "proftpd/current", #pour la date de fin de connection FTP
12     "secure", #pour les connexion FTP avec le username authentifie
13     @@ -143,6 +144,39 @@
14     my ($afp_cpu,$afp_mem,$afp_nbproc);
15     #squid.rrd => ps pidof
16     my ($squid_cpu,$squid_mem,$squid_nbproc);
17     +#mail_in s?qpsmtpd
18     +# This is the list of plugins we can get stats for
19     +# you can set the regex used to identify a line in the logs
20     +my %denied = (
21     + dnsbl => qr{(dnsbl\s+90|naughty\s+90\d\s+\(dnsbl\))},
22     + rhsbl => qr{rhsbl\s+90},
23     + uribl => qr{uribl\s+90},
24     + clamav => qr{virus::clam(av|dscan)\s+90},
25     + check_earlytalker => qr{(check_)?earlytalker\s+90},
26     + check_basicheaders => qr{(check_basic)?headers\s+90},
27     + check_goodrcptto => qr{(check_)?goodrcptto\s+90},
28     + check_spamhelo => qr{((check_spam)?helo\s+90|naughty\s+90\d\s+\(helo\))},
29     + fcrdns => qr{fcrdns\s+90},
30     + karma => qr{(karma\s+90|naughty\s+90\d\s+\(karma\))},
31     + spf => qr{(sender_permitted_from|spf_deny)\s+90},
32     + dmarc => qr{dmarc\s+90},
33     + tls_failed => qr{tls\s+90},
34     + resolvable_fromhost => qr{(require_)?resolvable_fromhost}
35     +);
36     +my @others = qw(total_denied spam_denied other_denied spam_queued queued total);
37     +my %cnt;
38     +foreach (keys %denied, @others){
39     + $cnt{$_} = 0;
40     +}
41     +# pour qmail
42     +my ($localqueue,$remotequeue);
43     +my @resultsqm = qw(failure deferral success total);
44     +my %cntqm;
45     +my %cntqmlocal;
46     +foreach (@resultsqm){
47     + $cntqm{$_} = 0;
48     + $cntqmlocal{$_} = 0;
49     +}
50    
51     #------------------------
52     #declaration de fonctions
53     @@ -248,7 +282,7 @@
54     print $body "Uptime: ",`/usr/bin/uptime`;
55     $body->close;
56    
57     - my $cnt=0;
58     + my $cont=0;
59     while(1)
60     {
61     # etape 1 : parsage des logs
62     @@ -268,10 +302,10 @@
63    
64     # etape 4 : envoi des eventuels mails d'alertes
65     mail_alerte();
66     - mail_status() if ($params{'StatusInterval'} && !($cnt % $params{'StatusInterval'}));
67     + mail_status() if ($params{'StatusInterval'} && !($cont % $params{'StatusInterval'}));
68    
69     sleep(300-time%300);
70     - $cnt++;
71     + $cont++;
72     }
73     }
74     #Fin du main
75     @@ -481,8 +515,15 @@
76     }
77    
78    
79     -
80     + # reset all counter before checking logs
81     ($net_dhcp,$net_mail_in,$net_mail_out,$net_spam,$net_virus)=(0,0,0,0,0);
82     + foreach (keys %denied, @others){
83     + $cnt{$_} = 0;
84     + }
85     + foreach (@resultsqm){
86     + $cntqm{$_} = 0;
87     + $cntqmlocal{$_} = 0;
88     + }
89     foreach my $nom (@logs) {
90     # on recupere un file handle positionné comme il faut
91     my $fh = seek_log("$logdir$nom");
92     @@ -609,45 +650,96 @@
93     if($l =~ /identified spam/) {$net_spam++;next;}
94     }
95     }
96     - elsif ($nom =~ /^s?qpsmtpd\/current$/) {
97     + elsif ($nom =~ /^qmail\/current$/) {
98     while ( defined(my $l = <$fh>)) {
99     - #@4000000043a825c60ff26f84 6556 dispatching RCPT TO:<admin@plop.gruiik.org>
100     - #@4000000043a825c60ff26f84 6556 dispatching RCPT TO:<moi@domaine.fr>
101     - if ($l =~ /@[0-9a-f]{24} \d+ dispatching RCPT TO:<([a-zA-Z0-9\._\-]+)@([a-zA-Z0-9\._\-]+)>/i) {
102     - my ($user,$domain)=($1,$2);
103     - foreach my $cur_filter (@MailDomainsMatch) {
104     - # si le filtre courant est une adresse mail (contient @)
105     - if ($cur_filter=~/@/) {
106     - #on verifie la correspondance complete
107     - if ($cur_filter =~ /^$user@.?$domain$/) {$net_mail_in++; last;}
108     - }
109     - else {
110     - #sinon on ne verifie la correspondance que pour le domaine
111     - if ($domain =~/.?$cur_filter/) {$net_mail_in++; last;}
112     - }
113     - }
114     + # accounting for remote connections
115     + # @400000004994ad092afa867c delivery 96906: success etc...
116     + if ($l =~ m/^\@[0-9a-f]{24} delivery \d+: (success|failure|deferral).*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|CNAME_lookup_failed_temporarily|Sorry,_I_wasn't_able_to_establish_an_SMTP_connection)/i) {
117     + my $result = $1;
118     + $cntqm{$result}++;
119     + next;
120     + }
121     + # accounting for local connections have to be after the remote
122     + if ($l =~ m/^\@[0-9a-f]{24} delivery \d+: (success|failure|deferral).*/i) {
123     + my $result = $1;
124     + $cntqmlocal{$result}++;
125     next;
126     }
127    
128     - #@4000000043a1c3a908438ffc 7905 dispatching MAIL FROM:<root@plop.gruiik.org>
129     - #@4000000043a1c3a908438ffc 7905 dispatching MAIL FROM:<root@mourf.biz>
130     - if ($l =~ /@[0-9a-f]{24} \d+ dispatching MAIL FROM:<([a-zA-Z0-9\._\-]+)@([a-zA-Z0-9\._\-]+)>/i) {
131     - my ($user,$domain)=($1,$2);
132     - foreach my $cur_filter (@MailDomainsMatch) {
133     - # si le filtre courant est une adresse mail (contient @)
134     - if ($cur_filter=~/@/) {
135     - #on verifie la correspondance complete
136     - if ($cur_filter =~ /^$user@.?$domain$/) {$net_mail_out++; last;}
137     - }
138     - else {
139     - #sinon on ne verifie la correspondance que pour le domaine
140     - if ($domain =~/.?$cur_filter/) {$net_mail_out++; last;}
141     +
142     + }
143     +
144     + # Calcul des totaux:
145     + foreach (@resultsqm){
146     + $cntqm{total} = $cntqm{total} + $cntqm{$_} if $_ !~ /total/;
147     + $cntqmlocal{total} = $cntqmlocal{total} + $cntqmlocal{$_} if $_ !~ /total/;
148     + }
149     + ## add qmail local queue
150     + $localqueue=`find /var/qmail/queue/local/ -type f | wc -l`;
151     + $localqueue=~ s/\D+//g;
152     + ### add qmail remote queue
153     + $remotequeue=`find /var/qmail/queue/remote/ -type f | wc -l`;
154     + $remotequeue=~ s/\D+//g;
155     + $net_mail_out=$cntqm{total};
156     +
157     + }
158     + elsif ($nom =~ /^s?qpsmtpd\/current$/) {
159     + while ( defined(my $l = <$fh>)) {
160     + # following code is copy paste from util_parse_mail from Daniel Berteaud for Zabbix monitoring
161     + # just changed $line to $l
162     + # We only want logterse lines like
163     + # @400000004994ad092afa867c 18386 logging::logterse plugin:
164     + # The format can slightly change depending on qpsmtpd version
165     + next unless $l =~ m/^\@[0-9a-f]{24} \d+( \((queue|deny)\))? logging::logterse/;
166     +
167     + # Lets count all the message which have been denied 'msg denied before queued'
168     + if ($l =~ m/msg denied before queued/){
169     + $cnt{total_denied}++;
170     + # Now try to find the plugin responsible for the deny
171     + foreach (keys %denied){
172     + if ($l =~ m/$denied{$_}/){
173     + $cnt{$_}++;
174     + }
175     }
176     + next;
177     }
178     - next;
179     - }
180     +
181     + # Rejected by spamassassin because spam score is too high
182     + elsif ($l =~ m/spam score exceeded threshold/){
183     + $cnt{spam_denied}++;
184     + next;
185     + }
186     +
187     + # Tagged as spam, but kept accepted
188     + elsif ($l =~ m/queued\s+<.*>\s+Yes,\s+(score|hits)=/){
189     + $cnt{spam_queued}++;
190     + next;
191     + }
192     +
193     + # Queued, not tagged as spam, those are the clean emails
194     + elsif ($l =~ m/queued\s+<.*>\s+No,\s+(score|hits)=/){
195     + $cnt{queued}++;
196     + next;
197     + }
198     +
199     + }
200     + # we try here.. maybe not the best place
201     + $cnt{total}=0;# as we parse qpsmtpd and then sqpsmtpd, we need to start from scratch the count while doint the last one
202     + # Now lets count other_denied, which is total_denied minus
203     + # all the known plugins denied
204     + $cnt{other_denied} = $cnt{total_denied};
205     + foreach (keys %denied){
206     + $cnt{total} = $cnt{total} + $cnt{$_};
207     + $cnt{other_denied} = $cnt{other_denied} - $cnt{$_};
208     + }
209     + # yes we potentially run this twice for nothing at the first run...
210     + foreach (@others){
211     + $cnt{total} = $cnt{total} + $cnt{$_} if ($_ !~ /total/);
212     }
213     + $net_mail_in=$cnt{spam_queued} + $cnt{queued};
214     +
215     }
216     +
217     elsif ($nom eq "messages") {
218     while ( defined(my $l = <$fh>)) {
219     #Baux DHCP
220     @@ -1215,7 +1307,7 @@
221     # print "if_ext_bin=$if_ext_bin,if_ext_bout=$if_ext_bout,if_ext_pin=$if_ext_pin,if_ext_pout=$if_ext_pout\n";
222     # print "net_samba=$net_samba,net_minlatency=$net_minlatency,net_avglatency=$net_avglatency,";
223     # print "net_maxlatency=$net_maxlatency,net_loss=$net_loss,net_spam=$net_spam,net_virus=$net_virus,";
224     -# print "net_dhcp=$net_dhcp,net_mail_in=$net_mail_in,net_mail_out=$net_mail_out\n";
225     + print "net_dhcp=$net_dhcp,net_mail_in=$net_mail_in,net_mail_out=$net_mail_out\n";
226     # print "cpu_total=$cpu_total,cpu_idle=$cpu_idle,cpu_system=$cpu_system,cpu_user=$cpu_user\n";
227     # print "cpu_nice=$cpu_nice,cpu_plist=$cpu_plist,cpu_runq=$cpu_runq";
228     # print "cpu_load1=$cpu_load1,cpu_load5=$cpu_load5,cpu_load15=$cpu_load15,cpu_uptime=$cpu_uptime\n";
229     @@ -1229,6 +1321,14 @@
230     # print "squid cpu=$squid_cpu, mem=$squid_mem, nb=$squid_nbproc\n";
231     # print "sessions_ftp=$sessions_ftp,sessions_ssh=$sessions_ssh,";
232     # print "sessions_vpn=$sessions_vpn,sessions_netbios=$sessions_netbios\n";
233     +#print "check_basicheaders=$mail_in_check_basicheaders,check_earlytalker=$mail_in_check_earlytalker,check_goodrcptto=$mail_in_check_goodrcptto,check_spamhelo=$mail_in_check_spamhelo,"
234     +#."clamav=$mail_in_clamav,dmarc=$mail_in_dmarc,dnsbl=$mail_in_dnsbl,fcrdns=$mail_in_fcrdns,karma=$mail_in_karma,other_denied=$mail_in_other_denied,queued=$mail_in_queued,resolvable_fromhost=$mail_in_resolvable_fromhost,"
235     +#."rhsbl=$mail_in_rhsbl,spam_denied=$mail_in_spam_denied,spam_queued=$mail_in_spam_queued,spf=$mail_in_spf,tls_failed=$mail_in_tls_failed,total=$mail_in_total,total_denied=$mail_in_total_denied,uribl=$mail_in_uribl\n";
236     +# foreach (keys %denied,@others){ print "$_: $cnt{$_},";}; print "\n";
237     +# print join(':', map {$cnt{$_}} keys %denied,@others); print "\n";
238     + foreach (@resultsqm){ print "local_$_:$cntqmlocal{$_},";}; foreach (@resultsqm){ print "$_:$cntqm{$_},";};
239     + print "localqueue=$localqueue,remotequeue=$remotequeue\n";
240     + print join(':', map {$cntqmlocal{$_}} @resultsqm) .":". join(':', map {$cntqm{$_}} @resultsqm); print ":". $localqueue .":". $remotequeue; print "\n";
241    
242     my %rrds=(
243     "sensors"=>"$sensors_temp1:$sensors_temp2:$sensors_temp_hd1:$sensors_temp_hd2:$sensors_fan_speed:$sensors_fan2_speed:$sensors_temp_hd3:$sensors_temp_hd4:$sensors_temp_hd5:$sensors_temp_hd6",
244     @@ -1242,8 +1342,11 @@
245     "samba"=>"$samba_cpu:$samba_mem:$samba_nbproc",
246     "afp"=>"$afp_cpu:$afp_mem:$afp_nbproc",
247     "squid"=>"$squid_cpu:$squid_mem:$squid_nbproc",
248     - "sessions"=>"$sessions_ssh:$sessions_ftp:$sessions_vpn:$sessions_netbios:$sessions_afp");
249     - my $error;
250     + "sessions"=>"$sessions_ssh:$sessions_ftp:$sessions_vpn:$sessions_netbios:$sessions_afp",
251     + "qpsmtpd" => join(':', map {$cnt{$_}} keys %denied,@others),
252     + "qmail" => join(':', map {$cntqmlocal{$_}} @resultsqm) .":". join(':', map {$cntqm{$_}} @resultsqm) . ":". $localqueue .":". $remotequeue);
253     +
254     + my $error;
255    
256     foreach my $rrd (keys %rrds) {
257     RRDs::update ("$rrddir/$rrd.rrd","N:$rrds{$rrd}");
258     @@ -1295,8 +1398,8 @@
259     gettext("(Possible reasons : do you receive spam ? a mailbomb ? mailing-lists ?)\n"),
260     gettext("If you have access to the server-manager, use this link to modify the limit :\n"),
261     "https://$SystemName.$DomainName/server-manager/cgi-bin/sme9admin?state=conf_alert&alert=MaxMailIn",
262     - "\n# tail /var/log/qpsmtpd/current\n",
263     - `/usr/bin/tail /var/log/qpsmtpd/current -n500 | /usr/local/bin/tai64nlocal |/bin/grep logterse`;
264     + "\n# tail /var/log/qmail/current\n",
265     + `/usr/bin/tail /var/log/qmail/current -n500 | /usr/local/bin/tai64nlocal |/bin/grep 'starting delivery'`;
266     }],
267     [
268     "($params{'MaxMailOut'} && $net_mail_out >= $params{'MaxMailOut'})",
269     @@ -1306,7 +1409,9 @@
270     sprintf(gettext("you had set the alert limit to %s outgoing e-mails.\n"),$params{'MaxMailOut'}),
271     gettext("(Possible reasons : do you send spam ? administrate a mailing-list ?)\n"),
272     gettext("If you have access to the server-manager, use this link to modify the limit :\n"),
273     - "https://$SystemName.$DomainName/server-manager/cgi-bin/sme9admin?state=conf_alert&alert=MaxMailOut";
274     + "https://$SystemName.$DomainName/server-manager/cgi-bin/sme9admin?state=conf_alert&alert=MaxMailOut",
275     + "\n# tail /var/log/qmail/current\n",
276 unnilennium 1.2 + `/usr/bin/tail /var/log/qmail/current -n500 |/usr/local/bin/tai64nlocal |/bin/grep -P "(starting delivery|delivery) \\d+: (msg \\d+|success|failure|deferral).*(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|CNAME_lookup_failed_temporarily|Sorry,_I_wasn't_able_to_establish_an_SMTP_connection|to remote .*)"`;
277 unnilennium 1.1 }],
278     [
279     "($params{'MaxDiskSpace'} && $pourc_hd_used >= $params{'MaxDiskSpace'})",
280     --- smeserver-sme9admin-1.5/root/etc/e-smith/web/functions/sme9admin.email 2014-12-24 07:41:01.000000000 +0100
281     +++ smeserver-sme9admin-1.5/root/etc/e-smith/web/functions/sme9admin 2016-12-15 18:26:20.000000000 +0100
282     @@ -64,6 +64,8 @@
283     sub showVpn;
284     sub showSsh;
285     sub showDhcpd;
286     +sub showQpsmtpd;
287     +sub showQmail;
288     #graph-pages-funcs
289     sub showHardGraph;
290     sub showNetGraph;
291     @@ -397,7 +399,7 @@
292     else
293     {
294     #si c'est un service pour lequel on a des infos complementaires...
295     - if($svc=~/^(httpd-e-smith|httpd-admin|smb|smbd|nmbd|atalk|squid|pptpd|dhcpd|sshd|proftpd|ftp|pppoe|pppd|wan)$/) {$details=1;}
296     + if($svc=~/^(httpd-e-smith|httpd-admin|smb|smbd|nmbd|atalk|squid|pptpd|dhcpd|sshd|proftpd|ftp|pppoe|pppd|wan|qmail|qpsmtpd|sqpsmtpd)$/) {$details=1;}
297     if ( -d "/service/$svc") {$cmd = "/usr/bin/sv s $svc";} # was -d /var/service or -d /service/
298     else {$cmd = "/sbin/e-smith/service $svc status|/bin/grep $svc";}
299     my @res=`$cmd`;
300     @@ -1052,6 +1054,8 @@
301     elsif ($q->param('service') eq 'proftpd') {showFtp();}
302     elsif ($q->param('service') eq 'ftp') {showFtp();}
303     elsif ($q->param('service') eq 'pppoe' || $q->param('service') eq 'wan' || $q->param('service') eq 'pppd' ) {showPppoe();}
304     + elsif ($q->param('service') eq 'qpsmtpd' || $q->param('service') eq 'sqpsmtpd' ) {showQpsmtpd();}
305     + elsif ($q->param('service') eq 'qmail') {showQmail();}
306     }
307    
308     #----------------------------------------------------------------
309     @@ -1061,6 +1065,32 @@
310     showSvcGraph("httpd",gettext("System load for the apache web server (httpd-e-smith & httpd-admin processes) on "));
311     }
312     #----------------------------------------------------------------
313     +#details du service qmail
314     +sub showQmail
315     +{
316     + my $start='-1d';
317     + printPopupMenu(gettext("View graphs on "));
318     + $start=$q->param('duree') if defined($q->param('duree'));
319     + print $q->p($q->b($labels{"$start"}));
320     + print $q->p($q->a ({href => "$progname"},gettext("Back\n")));
321     + #qmail local and remote email
322     + createGraphQmail($start);
323     +
324     +}
325     +#----------------------------------------------------------------
326     +#details du service s?qpsmtpd
327     +sub showQpsmtpd
328     +{
329     + my $start='-1d';
330     + printPopupMenu(gettext("View graphs on "));
331     + $start=$q->param('duree') if defined($q->param('duree'));
332     + print $q->p($q->b($labels{"$start"}));
333     + print $q->p($q->a ({href => "$progname"},gettext("Back\n")));
334     + #qpsmtpd incoming emails from outside the server( local network and internet)
335     + createGraphQpsmtpd($start);
336     +
337     +}
338     +#----------------------------------------------------------------
339     #details du service squid
340     sub showSquid
341     {
342     @@ -1612,26 +1642,10 @@
343     "COMMENT:Min\\: ","GPRINT:mindhcp:MIN:%4.0lf ","GPRINT:minsamba:MIN:%4.0lf","COMMENT:\\n",
344     "COMMENT:Last\\:","GPRINT:dhcp:LAST:%4.0lf ","GPRINT:samba:LAST:%4.0lf","COMMENT:\\n");
345    
346     - #mail entrant/sortant/virus/spam
347     - createShowGraph(gettext("Number of incoming/outgoing e-mails and amount of spam/viruses filtered."),"mail",
348     - "--title=".gettext("Incoming/outgoing/spam/virus e-mails"),
349     - "--start=$start",
350     - "DEF:mail_in=$rrddir/net.rrd:mail_in:AVERAGE","DEF:maxmail_in=$rrddir/net.rrd:mail_in:MAX","DEF:minmail_in=$rrddir/net.rrd:mail_in:MIN",
351     - "DEF:mail_out=$rrddir/net.rrd:mail_out:AVERAGE","DEF:maxmail_out=$rrddir/net.rrd:mail_out:MAX","DEF:minmail_out=$rrddir/net.rrd:mail_out:MIN",
352     - "DEF:spam=$rrddir/net.rrd:spam:AVERAGE","DEF:maxspam=$rrddir/net.rrd:spam:MAX","DEF:minspam=$rrddir/net.rrd:spam:MIN",
353     - "DEF:virus=$rrddir/net.rrd:virus:AVERAGE","DEF:maxvirus=$rrddir/net.rrd:virus:MAX","DEF:minvirus=$rrddir/net.rrd:virus:MIN",
354     - "CDEF:adj_mail_out=0,mail_out,-",
355     - "COMMENT: ","AREA:mail_in#1ED408:".gettext("Incoming mail"),"AREA:adj_mail_out#001ACD:".gettext("Outgoing mail"),
356     - "LINE2:spam#DAA520:Spam","LINE2:virus#DB0013:Virus","COMMENT:\\n",
357     - "COMMENT:Max\\: ","GPRINT:maxmail_in:MAX:%4.0lf ","GPRINT:maxmail_out:MAX:%4.0lf ",
358     - "GPRINT:maxspam:MAX:%4.0lf ","GPRINT:maxvirus:MAX:%4.0lf","COMMENT:\\n",
359     - "COMMENT:Min\\: ","GPRINT:minmail_in:MIN:%4.0lf ","GPRINT:minmail_out:MIN:%4.0lf ",
360     - "GPRINT:minspam:MIN:%4.0lf ","GPRINT:minvirus:MIN:%4.0lf","COMMENT:\\n",
361     - "COMMENT:Avg\\: ","GPRINT:mail_in:AVERAGE:%4.0lf ","GPRINT:mail_out:AVERAGE:%4.0lf ",
362     - "GPRINT:spam:AVERAGE:%4.0lf ","GPRINT:virus:AVERAGE:%4.0lf","COMMENT:\\n",
363     - "COMMENT:Last\\: ","GPRINT:mail_in:LAST:%4.0lf ","GPRINT:mail_out:LAST:%4.0lf ",
364     - "GPRINT:spam:LAST:%4.0lf ","GPRINT:virus:LAST:%4.0lf","COMMENT:\\n");
365     -
366     + #qmail local and remote email
367     + createGraphQmail($start);
368     + #qpsmtpd incoming emails from outside the server( local network and internet)
369     + createGraphQpsmtpd($start);
370    
371     #ping latency
372     createShowGraph(gettext("Average and maximal ping with the selected target."),"latency",
373     @@ -1870,4 +1884,92 @@
374     print $q->p($q->a ({href => "$progname"},gettext("Back\n")));
375     }
376    
377     +sub createGraphQmail {
378     + my($start)=(@_);
379     + #qmail entrant/sortant
380     + createShowGraph(gettext("Number of local/remote e-mails handled by the internal mail service (including other service generated e-mails)."),"qmail",
381     + "--title=".gettext("Local/Remote e-mails"),
382     + "--start=$start",
383     + "DEF:local_failure=$rrddir/qmail.rrd:local_failure:AVERAGE","DEF:maxlocal_failure=$rrddir/qmail.rrd:local_failure:MAX","DEF:minlocal_failure=$rrddir/qmail.rrd:local_failure:MIN",
384     + "DEF:local_deferral=$rrddir/qmail.rrd:local_deferral:AVERAGE","DEF:maxlocal_deferral=$rrddir/qmail.rrd:local_deferral:MAX","DEF:minlocal_deferral=$rrddir/qmail.rrd:local_deferral:MIN",
385     + "DEF:local_success=$rrddir/qmail.rrd:local_success:AVERAGE","DEF:maxlocal_success=$rrddir/qmail.rrd:local_success:MAX","DEF:minlocal_success=$rrddir/qmail.rrd:local_success:MIN",
386     + "DEF:local_total=$rrddir/qmail.rrd:local_total:AVERAGE","DEF:maxlocal_total=$rrddir/qmail.rrd:local_total:MAX","DEF:minlocal_total=$rrddir/qmail.rrd:local_total:MIN",
387     + "DEF:remote_failure=$rrddir/qmail.rrd:remote_failure:AVERAGE","DEF:maxremote_failure=$rrddir/qmail.rrd:remote_failure:MAX","DEF:minremote_failure=$rrddir/qmail.rrd:remote_failure:MIN",
388     + "DEF:remote_deferral=$rrddir/qmail.rrd:remote_deferral:AVERAGE","DEF:maxremote_deferral=$rrddir/qmail.rrd:remote_deferral:MAX","DEF:minremote_deferral=$rrddir/qmail.rrd:remote_deferral:MIN",
389     + "DEF:remote_success=$rrddir/qmail.rrd:remote_success:AVERAGE","DEF:maxremote_success=$rrddir/qmail.rrd:remote_success:MAX","DEF:minremote_success=$rrddir/qmail.rrd:remote_success:MIN",
390     + "DEF:remote_total=$rrddir/qmail.rrd:remote_total:AVERAGE","DEF:maxremote_total=$rrddir/qmail.rrd:remote_total:MAX","DEF:minremote_total=$rrddir/qmail.rrd:remote_total:MIN",
391     + "DEF:local_queue=$rrddir/qmail.rrd:local_queue:AVERAGE","DEF:maxlocal_queue=$rrddir/qmail.rrd:local_queue:MAX","DEF:minlocal_queue=$rrddir/qmail.rrd:local_queue:MIN",
392     + "DEF:remote_queue=$rrddir/qmail.rrd:remote_queue:AVERAGE","DEF:maxremote_queue=$rrddir/qmail.rrd:remote_queue:MAX","DEF:minremote_queue=$rrddir/qmail.rrd:remote_queue:MIN",
393     + "CDEF:adj_remote_total=0,remote_total,-", "CDEF:adj_remote_queue=0,remote_queue,-",
394     + "CDEF:adj_remote_failure=0,remote_failure,-", "CDEF:adj_remote_deferral=0,remote_deferral,-","CDEF:adj_remote_success=0,remote_success,-",
395     + "COMMENT:Last\\t Min\\t Avg\\t Max\\r",
396     + "COMMENT:\\n","AREA:local_total#1ED408:".gettext("Total local e-mails"),"COMMENT:\\u","GPRINT:local_total:LAST:%4.0lf ","GPRINT:minlocal_total:MIN:%4.0lf ","GPRINT:local_total:AVERAGE:%4.0lf ","GPRINT:maxlocal_total:MAX:%4.0lf \\r",
397     + "COMMENT:\\n","COMMENT: ".gettext("Total remote e-mails"), "COMMENT:\\u","GPRINT:remote_total:LAST:%4.0lf ","GPRINT:minremote_total:MIN:%4.0lf ","GPRINT:remote_total:AVERAGE:%4.0lf ","GPRINT:maxremote_total:MAX:%4.0lf \\r",
398     +
399     + "COMMENT:\\n","COMMENT: ","AREA:adj_remote_success#0000ff:".gettext("Remote e-mail success"), "COMMENT:\\u","GPRINT:remote_success:LAST:%4.0lf ","GPRINT:minremote_success:MIN:%4.0lf ","GPRINT:remote_success:AVERAGE:%4.0lf ","GPRINT:maxremote_success:MAX:%4.0lf \\r",
400     + "COMMENT:\\n","COMMENT: ","AREA:adj_remote_deferral#ffff00:".gettext("Remote e-mail deferral").":STACK", "COMMENT:\\u","GPRINT:remote_deferral:LAST:%4.0lf ","GPRINT:minremote_deferral:MIN:%4.0lf ","GPRINT:remote_deferral:AVERAGE:%4.0lf ","GPRINT:maxremote_deferral:MAX:%4.0lf \\r",
401     + "COMMENT:\\n","COMMENT: ","AREA:adj_remote_failure#ff0000:".gettext("Remote e-mail failure").":STACK", "COMMENT:\\u","GPRINT:remote_failure:LAST:%4.0lf ","GPRINT:minremote_failure:MIN:%4.0lf ","GPRINT:remote_failure:AVERAGE:%4.0lf ","GPRINT:maxremote_failure:MAX:%4.0lf \\r",
402     +
403     + "COMMENT:\\n","LINE2:local_queue#666666:".gettext("Local queue"),"COMMENT:\\u", "GPRINT:local_queue:LAST:%4.0lf ","GPRINT:minlocal_queue:MIN:%4.0lf ","GPRINT:local_queue:AVERAGE:%4.0lf ","GPRINT:maxlocal_queue:MAX:%4.0lf \\r",
404     + "COMMENT:\\n","LINE2:adj_remote_queue#000000:".gettext("Remote queue"),"COMMENT:\\u", "GPRINT:remote_queue:LAST:%4.0lf ","GPRINT:minremote_queue:MIN:%4.0lf ","GPRINT:remote_queue:AVERAGE:%4.0lf ","GPRINT:maxremote_queue:MAX:%4.0lf \\r",
405     + "COMMENT:\\n");
406     +
407    
408     +}
409     +
410     +sub createGraphQpsmtpd {
411     + my($start)=(@_);
412     + #qpsmtpd
413     + #check_basicheaders:check_goodrcptto:clamav:karma:tls_failed:rhsbl:check_earlytalker:resolvable_fromhost:dnsbl:fcrdns:spf:check_spamhelo:uribl:dmarc:total_denied:spam_denied:other_denied:spam_queued:queued:total
414     + createShowGraph(gettext("Number of incoming e-mail connections to qpsmtpd services (outside of server incoming e-mails) and amount of spam/viruses filtered."),"qpsmtpd",
415     + "--title=".gettext("Incoming qpsmtpd connections spam/virus/e-mails"),
416     + "--start=$start",
417     + "DEF:check_basicheaders=$rrddir/qpsmtpd.rrd:check_basicheaders:AVERAGE","DEF:maxcheck_basicheaders=$rrddir/qpsmtpd.rrd:check_basicheaders:MAX","DEF:mincheck_basicheaders=$rrddir/qpsmtpd.rrd:check_basicheaders:MIN",
418     + "DEF:check_goodrcptto=$rrddir/qpsmtpd.rrd:check_goodrcptto:AVERAGE","DEF:maxcheck_goodrcptto=$rrddir/qpsmtpd.rrd:check_goodrcptto:MAX","DEF:mincheck_goodrcptto=$rrddir/qpsmtpd.rrd:check_goodrcptto:MIN",
419     + "DEF:clamav=$rrddir/qpsmtpd.rrd:clamav:AVERAGE","DEF:maxclamav=$rrddir/qpsmtpd.rrd:clamav:MAX","DEF:minclamav=$rrddir/qpsmtpd.rrd:clamav:MIN",
420     + "DEF:karma=$rrddir/qpsmtpd.rrd:karma:AVERAGE","DEF:maxkarma=$rrddir/qpsmtpd.rrd:karma:MAX","DEF:minkarma=$rrddir/qpsmtpd.rrd:karma:MIN",
421     + "DEF:tls_failed=$rrddir/qpsmtpd.rrd:tls_failed:AVERAGE","DEF:maxtls_failed=$rrddir/qpsmtpd.rrd:tls_failed:MAX","DEF:mintls_failed=$rrddir/qpsmtpd.rrd:tls_failed:MIN",
422     + "DEF:rhsbl=$rrddir/qpsmtpd.rrd:rhsbl:AVERAGE","DEF:maxrhsbl=$rrddir/qpsmtpd.rrd:rhsbl:MAX","DEF:minrhsbl=$rrddir/qpsmtpd.rrd:rhsbl:MIN",
423     + "DEF:check_earlytalker=$rrddir/qpsmtpd.rrd:check_earlytalker:AVERAGE","DEF:maxcheck_earlytalker=$rrddir/qpsmtpd.rrd:check_earlytalker:MAX","DEF:mincheck_earlytalker=$rrddir/qpsmtpd.rrd:check_earlytalker:MIN",
424     + "DEF:resolvable_fromhost=$rrddir/qpsmtpd.rrd:resolvable_fromhost:AVERAGE","DEF:maxresolvable_fromhost=$rrddir/qpsmtpd.rrd:resolvable_fromhost:MAX","DEF:minresolvable_fromhost=$rrddir/qpsmtpd.rrd:resolvable_fromhost:MIN",
425     + "DEF:dnsbl=$rrddir/qpsmtpd.rrd:dnsbl:AVERAGE","DEF:maxdnsbl=$rrddir/qpsmtpd.rrd:dnsbl:MAX","DEF:mindnsbl=$rrddir/qpsmtpd.rrd:dnsbl:MIN",
426     + "DEF:fcrdns=$rrddir/qpsmtpd.rrd:fcrdns:AVERAGE","DEF:maxfcrdns=$rrddir/qpsmtpd.rrd:fcrdns:MAX","DEF:minfcrdns=$rrddir/qpsmtpd.rrd:fcrdns:MIN",
427     + "DEF:spf=$rrddir/qpsmtpd.rrd:spf:AVERAGE","DEF:maxspf=$rrddir/qpsmtpd.rrd:spf:MAX","DEF:minspf=$rrddir/qpsmtpd.rrd:spf:MIN",
428     + "DEF:check_spamhelo=$rrddir/qpsmtpd.rrd:check_spamhelo:AVERAGE","DEF:maxcheck_spamhelo=$rrddir/qpsmtpd.rrd:check_spamhelo:MAX","DEF:mincheck_spamhelo=$rrddir/qpsmtpd.rrd:check_spamhelo:MIN",
429     + "DEF:uribl=$rrddir/qpsmtpd.rrd:uribl:AVERAGE","DEF:maxuribl=$rrddir/qpsmtpd.rrd:uribl:MAX","DEF:minuribl=$rrddir/qpsmtpd.rrd:uribl:MIN",
430     + "DEF:dmarc=$rrddir/qpsmtpd.rrd:dmarc:AVERAGE","DEF:maxdmarc=$rrddir/qpsmtpd.rrd:dmarc:MAX","DEF:mindmarc=$rrddir/qpsmtpd.rrd:dmarc:MIN",
431     + "DEF:total_denied=$rrddir/qpsmtpd.rrd:total_denied:AVERAGE","DEF:maxtotal_denied=$rrddir/qpsmtpd.rrd:total_denied:MAX","DEF:mintotal_denied=$rrddir/qpsmtpd.rrd:total_denied:MIN",
432     + "DEF:spam_denied=$rrddir/qpsmtpd.rrd:spam_denied:AVERAGE","DEF:maxspam_denied=$rrddir/qpsmtpd.rrd:spam_denied:MAX","DEF:minspam_denied=$rrddir/qpsmtpd.rrd:spam_denied:MIN",
433     + "DEF:other_denied=$rrddir/qpsmtpd.rrd:other_denied:AVERAGE","DEF:maxother_denied=$rrddir/qpsmtpd.rrd:other_denied:MAX","DEF:minother_denied=$rrddir/qpsmtpd.rrd:other_denied:MIN",
434     +
435     + "DEF:spam_queued=$rrddir/qpsmtpd.rrd:spam_queued:AVERAGE","DEF:maxspam_queued=$rrddir/qpsmtpd.rrd:spam_queued:MAX","DEF:minspam_queued=$rrddir/qpsmtpd.rrd:spam_queued:MIN",
436     + "DEF:queued=$rrddir/qpsmtpd.rrd:queued:AVERAGE","DEF:maxqueued=$rrddir/qpsmtpd.rrd:queued:MAX","DEF:minqueued=$rrddir/qpsmtpd.rrd:queued:MIN",
437     + "DEF:total=$rrddir/qpsmtpd.rrd:total:AVERAGE","DEF:maxtotal=$rrddir/qpsmtpd.rrd:total:MAX","DEF:mintotal=$rrddir/qpsmtpd.rrd:total:MIN",
438     + "CDEF:total_accepted=queued,spam_queued,+",
439     + "COMMENT:Last\\t Min\\t Avg\\t Max\\r",
440     +
441     + "COMMENT:\\n","COMMENT:".gettext("Total"),"COMMENT:\\u","GPRINT:total:LAST:%4.0lf ","GPRINT:mintotal:MIN:%4.0lf ","GPRINT:total:AVERAGE:%4.0lf ","GPRINT:maxtotal:MAX:%4.0lf \\r",
442     + "COMMENT:".gettext("Total accepted e-mails"),"COMMENT:\\u","GPRINT:total_accepted:LAST:%4.0lf ","GPRINT:total_accepted:MIN:%4.0lf ","GPRINT:total_accepted:AVERAGE:%4.0lf ","GPRINT:total_accepted:MAX:%4.0lf \\r",
443     + "COMMENT:\\n", "AREA:spam_queued#8fd487:".gettext("Accepted e-mails")."\\: ".gettext("spam queued"),"COMMENT:\\u","GPRINT:spam_queued:LAST:%4.0lf ","GPRINT:minspam_queued:MIN:%4.0lf ","GPRINT:spam_queued:AVERAGE:%4.0lf ","GPRINT:maxspam_queued:MAX:%4.0lf \\r",
444     + "COMMENT:\\n","AREA:queued#1ED408:".gettext("Accepted e-mails")."\\: ".gettext("queued").":STACK","COMMENT:\\u","GPRINT:queued:LAST:%4.0lf ","GPRINT:minqueued:MIN:%4.0lf ","GPRINT:queued:AVERAGE:%4.0lf ","GPRINT:maxqueued:MAX:%4.0lf \\r",
445     +
446     + "COMMENT:\\n", "COMMENT:".gettext("Total denied e-mails"),"COMMENT:\\u","GPRINT:total_denied:LAST:%4.0lf ","GPRINT:mintotal_denied:MIN:%4.0lf ","GPRINT:total_denied:AVERAGE:%4.0lf ","GPRINT:maxtotal_denied:MAX:%4.0lf \\r",
447     + "COMMENT:\\n", "AREA:check_spamhelo#007a7a:".gettext("Denied e-mails")."\\: ".gettext("check_spamhelo").":STACK","COMMENT:\\u","GPRINT:check_spamhelo:LAST:%4.0lf ","GPRINT:mincheck_spamhelo:MIN:%4.0lf ","GPRINT:check_spamhelo:AVERAGE:%4.0lf ","GPRINT:maxcheck_spamhelo:MAX:%4.0lf \\r",
448     + "COMMENT:\\n", "AREA:other_denied#666666:".gettext("Denied e-mails")."\\: ".gettext("other reasons").":STACK","COMMENT:\\u","GPRINT:other_denied:LAST:%4.0lf ","GPRINT:minother_denied:MIN:%4.0lf ","GPRINT:other_denied:AVERAGE:%4.0lf ","GPRINT:maxother_denied:MAX:%4.0lf \\r",
449     + "COMMENT:\\n", "AREA:tls_failed#990099:".gettext("Denied e-mails")."\\: ".gettext("tls failed").":STACK","COMMENT:\\u","GPRINT:tls_failed:LAST:%4.0lf ","GPRINT:mintls_failed:MIN:%4.0lf ","GPRINT:tls_failed:AVERAGE:%4.0lf ","GPRINT:maxtls_failed:MAX:%4.0lf \\r",
450     + "COMMENT:\\n", "AREA:spf#00004f:".gettext("Denied e-mails")."\\: ".gettext("spf").":STACK","COMMENT:\\u","GPRINT:spf:LAST:%4.0lf ","GPRINT:minspf:MIN:%4.0lf ","GPRINT:spf:AVERAGE:%4.0lf ","GPRINT:maxspf:MAX:%4.0lf \\r",
451     + "COMMENT:\\n", "AREA:resolvable_fromhost#ff99ff:".gettext("Denied e-mails")."\\: ".gettext("resolvable_fromhost").":STACK","COMMENT:\\u","GPRINT:resolvable_fromhost:LAST:%4.0lf ","GPRINT:minresolvable_fromhost:MIN:%4.0lf ","GPRINT:resolvable_fromhost:AVERAGE:%4.0lf ","GPRINT:maxresolvable_fromhost:MAX:%4.0lf \\r",
452     + "COMMENT:\\n", "AREA:karma#ffff00:".gettext("Denied e-mails")."\\: ".gettext("karma").":STACK","COMMENT:\\u","GPRINT:karma:LAST:%4.0lf ","GPRINT:minkarma:MIN:%4.0lf ","GPRINT:karma:AVERAGE:%4.0lf ","GPRINT:maxkarma:MAX:%4.0lf \\r",
453     + "COMMENT:\\n", "AREA:check_basicheaders#ff00ff:".gettext("Denied e-mails")."\\: ".gettext("check_basicheaders").":STACK","COMMENT:\\u","GPRINT:check_basicheaders:LAST:%4.0lf ","GPRINT:mincheck_basicheaders:MIN:%4.0lf ","GPRINT:check_basicheaders:AVERAGE:%4.0lf ","GPRINT:maxcheck_basicheaders:MAX:%4.0lf \\r",
454     + "COMMENT:\\n", "AREA:check_goodrcptto#00ffff:".gettext("Denied e-mails")."\\: ".gettext("check_goodrcptto").":STACK","COMMENT:\\u","GPRINT:check_goodrcptto:LAST:%4.0lf ","GPRINT:mincheck_goodrcptto:MIN:%4.0lf ","GPRINT:check_goodrcptto:AVERAGE:%4.0lf ","GPRINT:maxcheck_goodrcptto:MAX:%4.0lf \\r",
455     + "COMMENT:\\n", "AREA:uribl#4c004c:".gettext("Denied e-mails")."\\: ".gettext("uribl").":STACK","COMMENT:\\u","GPRINT:uribl:LAST:%4.0lf ","GPRINT:minuribl:MIN:%4.0lf ","GPRINT:uribl:AVERAGE:%4.0lf ","GPRINT:maxuribl:MAX:%4.0lf \\r",
456     + "COMMENT:\\n", "AREA:rhsbl#7f7f7f:".gettext("Denied e-mails")."\\: ".gettext("rhsbl").":STACK","COMMENT:\\u","GPRINT:rhsbl:LAST:%4.0lf ","GPRINT:minrhsbl:MIN:%4.0lf ","GPRINT:rhsbl:AVERAGE:%4.0lf ","GPRINT:maxrhsbl:MAX:%4.0lf \\r",
457     + "COMMENT:\\n", "AREA:dnsbl#0000ff:".gettext("Denied e-mails")."\\: ".gettext("dnsbl").":STACK","COMMENT:\\u","GPRINT:dnsbl:LAST:%4.0lf ","GPRINT:mindnsbl:MIN:%4.0lf ","GPRINT:dnsbl:AVERAGE:%4.0lf ","GPRINT:maxdnsbl:MAX:%4.0lf \\r",
458     + "COMMENT:\\n", "AREA:check_earlytalker#7c7cff:".gettext("Denied e-mails")."\\: ".gettext("check_earlytalker").":STACK","COMMENT:\\u","GPRINT:check_earlytalker:LAST:%4.0lf ","GPRINT:mincheck_earlytalker:MIN:%4.0lf ","GPRINT:check_earlytalker:AVERAGE:%4.0lf ","GPRINT:maxcheck_earlytalker:MAX:%4.0lf \\r",
459     + "COMMENT:\\n", "AREA:fcrdns#827f00:".gettext("Denied e-mails")."\\: ".gettext("fcrdns").":STACK","COMMENT:\\u","GPRINT:fcrdns:LAST:%4.0lf ","GPRINT:minfcrdns:MIN:%4.0lf ","GPRINT:fcrdns:AVERAGE:%4.0lf ","GPRINT:maxfcrdns:MAX:%4.0lf \\r",
460     + "COMMENT:\\n", "AREA:dmarc#7f0000:".gettext("Denied e-mails")."\\: ".gettext("dmarc").":STACK","COMMENT:\\u","GPRINT:dmarc:LAST:%4.0lf ","GPRINT:mindmarc:MIN:%4.0lf ","GPRINT:dmarc:AVERAGE:%4.0lf ","GPRINT:maxdmarc:MAX:%4.0lf \\r",
461     + "COMMENT:\\n", "AREA:spam_denied#DAA520:".gettext("Denied e-mails")."\\: ".gettext("spam denied").":STACK","COMMENT:\\u","GPRINT:spam_denied:LAST:%4.0lf ","GPRINT:minspam_denied:MIN:%4.0lf ","GPRINT:spam_denied:AVERAGE:%4.0lf ","GPRINT:maxspam_denied:MAX:%4.0lf \\r",
462     + "COMMENT:\\n", "AREA:clamav#ff0000:".gettext("Denied e-mails")."\\: ".gettext("virus").":STACK","COMMENT:\\u","GPRINT:clamav:LAST:%4.0lf ","GPRINT:minclamav:MIN:%4.0lf ","GPRINT:clamav:AVERAGE:%4.0lf ","GPRINT:maxclamav:MAX:%4.0lf \\r",
463     + "COMMENT:\\n");
464     +
465     +}
466     --- smeserver-sme9admin-1.5/root/usr/share/doc/smeserver-sme9admin/create-rrd.sh.email 2014-12-24 07:41:01.000000000 +0100
467     +++ smeserver-sme9admin-1.5/root/usr/share/doc/smeserver-sme9admin/create-rrd.sh 2016-12-08 23:18:58.000000000 +0100
468     @@ -429,4 +429,83 @@
469     RRA:MIN:0.5:24:372 \
470     RRA:MIN:0.5:288:365 \
471    
472     +# qpsmtpd.rrd : stats connexions email entrant
473     +
474     +# nombre et raisons de connexions refusées ou accéptées
475     +
476     +rrdtool create /var/lib/sme9admin/qpsmtpd.rrd -s 300 \
477     + DS:check_basicheaders:GAUGE:600:0:U \
478     + DS:check_goodrcptto:GAUGE:600:0:U \
479     + DS:clamav:GAUGE:600:0:U \
480     + DS:karma:GAUGE:600:0:U \
481     + DS:tls_failed:GAUGE:600:0:U \
482     + DS:rhsbl:GAUGE:600:0:U \
483     + DS:check_earlytalker:GAUGE:600:0:U \
484     + DS:resolvable_fromhost:GAUGE:600:0:U \
485     + DS:dnsbl:GAUGE:600:0:U \
486     + DS:fcrdns:GAUGE:600:0:U \
487     + DS:spf:GAUGE:600:0:U \
488     + DS:check_spamhelo:GAUGE:600:0:U \
489     + DS:uribl:GAUGE:600:0:U \
490     + DS:dmarc:GAUGE:600:0:U \
491     + DS:total_denied::GAUGE:600:0:U \
492     + DS:spam_denied::GAUGE:600:0:U \
493     + DS:other_denied::GAUGE:600:0:U \
494     + DS:spam_queued::GAUGE:600:0:U \
495     + DS:queued::GAUGE:600:0:U \
496     + DS:total::GAUGE:600:0:U \
497     + RRA:AVERAGE:0.5:1:12 \
498     + RRA:AVERAGE:0.5:1:72 \
499     + RRA:AVERAGE:0.5:1:288 \
500     + RRA:AVERAGE:0.5:6:336 \
501     + RRA:AVERAGE:0.5:24:372 \
502     + RRA:AVERAGE:0.5:288:365 \
503     + RRA:MAX:0.5:1:12 \
504     + RRA:MAX:0.5:1:72 \
505     + RRA:MAX:0.5:1:288 \
506     + RRA:MAX:0.5:6:336 \
507     + RRA:MAX:0.5:24:372 \
508     + RRA:MAX:0.5:288:365 \
509     + RRA:MIN:0.5:1:12 \
510     + RRA:MIN:0.5:1:72 \
511     + RRA:MIN:0.5:1:288 \
512     + RRA:MIN:0.5:6:336 \
513     + RRA:MIN:0.5:24:372 \
514     + RRA:MIN:0.5:288:365 \
515     +
516     +# qmail.rrd : stats connexions email sortant local et distant
517     +
518     +# nombre et raisons de connexions refusées ou acceptées et file d'attente
519     +rrdtool create /var/lib/sme9admin/qmail.rrd -s 300 \
520     + DS:local_failure:GAUGE:600:0:U \
521     + DS:local_deferral:GAUGE:600:0:U \
522     + DS:local_success:GAUGE:600:0:U \
523     + DS:local_total:GAUGE:600:0:U \
524     + DS:remote_failure:GAUGE:600:0:U \
525     + DS:remote_deferral:GAUGE:600:0:U \
526     + DS:remote_success:GAUGE:600:0:U \
527     + DS:remote_total:GAUGE:600:0:U \
528     + DS:local_queue:GAUGE:600:0:U \
529     + DS:remote_queue:GAUGE:600:0:U \
530     + RRA:AVERAGE:0.5:1:12 \
531     + RRA:AVERAGE:0.5:1:72 \
532     + RRA:AVERAGE:0.5:1:288 \
533     + RRA:AVERAGE:0.5:6:336 \
534     + RRA:AVERAGE:0.5:24:372 \
535     + RRA:AVERAGE:0.5:288:365 \
536     + RRA:MAX:0.5:1:12 \
537     + RRA:MAX:0.5:1:72 \
538     + RRA:MAX:0.5:1:288 \
539     + RRA:MAX:0.5:6:336 \
540     + RRA:MAX:0.5:24:372 \
541     + RRA:MAX:0.5:288:365 \
542     + RRA:MIN:0.5:1:12 \
543     + RRA:MIN:0.5:1:72 \
544     + RRA:MIN:0.5:1:288 \
545     + RRA:MIN:0.5:6:336 \
546     + RRA:MIN:0.5:24:372 \
547     + RRA:MIN:0.5:288:365 \
548     +
549     +
550     +
551     echo -e "Creation of rrds files :\t\t[OK]"
552     --- smeserver-sme9admin-1.5/root/etc/e-smith/sql/init/sme9admin.email 2014-12-24 07:41:01.000000000 +0100
553     +++ smeserver-sme9admin-1.5/root/etc/e-smith/sql/init/sme9admin 2016-12-08 23:18:19.000000000 +0100
554     @@ -39,3 +39,77 @@
555     #si c'est une freshinstall on cree les rrd
556     sh /usr/share/doc/smeserver-sme9admin/create-rrd.sh
557     fi
558     + if [[ ! -f /var/lib/sme9admin/qpsmtpd.rrd ]]; then
559     + # si le rrd qpsmtpd existe pas (nouveauté SME9)
560     + rrdtool create /var/lib/sme9admin/qpsmtpd.rrd -s 300 \
561     + DS:check_basicheaders:GAUGE:600:0:U \
562     + DS:check_goodrcptto:GAUGE:600:0:U \
563     + DS:clamav:GAUGE:600:0:U \
564     + DS:karma:GAUGE:600:0:U \
565     + DS:tls_failed:GAUGE:600:0:U \
566     + DS:rhsbl:GAUGE:600:0:U \
567     + DS:check_earlytalker:GAUGE:600:0:U \
568     + DS:resolvable_fromhost:GAUGE:600:0:U \
569     + DS:dnsbl:GAUGE:600:0:U \
570     + DS:fcrdns:GAUGE:600:0:U \
571     + DS:spf:GAUGE:600:0:U \
572     + DS:check_spamhelo:GAUGE:600:0:U \
573     + DS:uribl:GAUGE:600:0:U \
574     + DS:dmarc:GAUGE:600:0:U \
575     + DS:total_denied:GAUGE:600:0:U \
576     + DS:spam_denied:GAUGE:600:0:U \
577     + DS:other_denied:GAUGE:600:0:U \
578     + DS:spam_queued:GAUGE:600:0:U \
579     + DS:queued:GAUGE:600:0:U \
580     + DS:total:GAUGE:600:0:U \
581     + RRA:AVERAGE:0.5:1:12 \
582     + RRA:AVERAGE:0.5:1:72 \
583     + RRA:AVERAGE:0.5:1:288 \
584     + RRA:AVERAGE:0.5:6:336 \
585     + RRA:AVERAGE:0.5:24:372 \
586     + RRA:AVERAGE:0.5:288:365 \
587     + RRA:MAX:0.5:1:12 \
588     + RRA:MAX:0.5:1:72 \
589     + RRA:MAX:0.5:1:288 \
590     + RRA:MAX:0.5:6:336 \
591     + RRA:MAX:0.5:24:372 \
592     + RRA:MAX:0.5:288:365 \
593     + RRA:MIN:0.5:1:12 \
594     + RRA:MIN:0.5:1:72 \
595     + RRA:MIN:0.5:1:288 \
596     + RRA:MIN:0.5:6:336 \
597     + RRA:MIN:0.5:24:372 \
598     + RRA:MIN:0.5:288:365
599     + fi
600     + if [[ ! -f /var/lib/sme9admin/qmail.rrd ]]; then
601     + # nombre et raisons de connexions refusées ou acceptées et file d'attente
602     + rrdtool create /var/lib/sme9admin/qmail.rrd -s 300 \
603     + DS:local_failure:GAUGE:600:0:U \
604     + DS:local_deferral:GAUGE:600:0:U \
605     + DS:local_success:GAUGE:600:0:U \
606     + DS:local_total:GAUGE:600:0:U \
607     + DS:remote_failure:GAUGE:600:0:U \
608     + DS:remote_deferral:GAUGE:600:0:U \
609     + DS:remote_success:GAUGE:600:0:U \
610     + DS:remote_total:GAUGE:600:0:U \
611     + DS:local_queue:GAUGE:600:0:U \
612     + DS:remote_queue:GAUGE:600:0:U \
613     + RRA:AVERAGE:0.5:1:12 \
614     + RRA:AVERAGE:0.5:1:72 \
615     + RRA:AVERAGE:0.5:1:288 \
616     + RRA:AVERAGE:0.5:6:336 \
617     + RRA:AVERAGE:0.5:24:372 \
618     + RRA:AVERAGE:0.5:288:365 \
619     + RRA:MAX:0.5:1:12 \
620     + RRA:MAX:0.5:1:72 \
621     + RRA:MAX:0.5:1:288 \
622     + RRA:MAX:0.5:6:336 \
623     + RRA:MAX:0.5:24:372 \
624     + RRA:MAX:0.5:288:365 \
625     + RRA:MIN:0.5:1:12 \
626     + RRA:MIN:0.5:1:72 \
627     + RRA:MIN:0.5:1:288 \
628     + RRA:MIN:0.5:6:336 \
629     + RRA:MIN:0.5:24:372 \
630     + RRA:MIN:0.5:288:365
631     + fi

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed