aboutsummaryrefslogtreecommitdiffstats
path: root/config/mailreport
diff options
context:
space:
mode:
Diffstat (limited to 'config/mailreport')
-rw-r--r--config/mailreport/mail_reports.inc51
-rw-r--r--config/mailreport/mail_reports_generate.php2
-rw-r--r--config/mailreport/mailreport.xml2
3 files changed, 50 insertions, 5 deletions
diff --git a/config/mailreport/mail_reports.inc b/config/mailreport/mail_reports.inc
index 6dddf7cd..669b1541 100644
--- a/config/mailreport/mail_reports.inc
+++ b/config/mailreport/mail_reports.inc
@@ -286,7 +286,7 @@ function mail_report_generate_graph($database, $style, $graph, $start, $end) {
/* this should never happen */
if($end < $start) {
- log_error("start $start is smaller than end $end");
+ log_error("start $start is greater than end $end");
$end = $now;
}
@@ -392,7 +392,7 @@ function mail_report_generate_graph($database, $style, $graph, $start, $end) {
$speedlimit = ($upstream + $downstream);
- /* Set default colors explicity, the theme can then override them below.
+ /* Set default colors explicitly, the theme can then override them below.
This prevents missing colors in themes from crashing the graphs. */
$colortrafficup = array("666666", "CCCCCC");
$colortrafficdown = array("990000", "CC0000");
@@ -402,6 +402,7 @@ function mail_report_generate_graph($database, $style, $graph, $start, $end) {
$colorstates = array('990000','a83c3c','b36666','bd9090','cccccc','000000');
$colorprocessor = array('990000','a83c3c','b36666','bd9090','cccccc','000000');
$colormemory = array('990000','a83c3c','b36666','bd9090','cccccc','000000');
+ $colormbuf = array('990000','a83c3c','b36666','bd9090','cccccc','000000');
$colorqueuesup = array('000000','7B0000','990000','BB0000','CC0000','D90000','EE0000','FF0000','CC0000');
$colorqueuesdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC');
$colorqueuesdropup = array('000000','7B0000','990000','BB0000','CC0000','D90000','EE0000','FF0000','CC0000');
@@ -718,7 +719,7 @@ function mail_report_generate_graph($database, $style, $graph, $start, $end) {
$graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t`date +\"%b %d %H\:%M\:%S %Y\"`\" ";
}
elseif((strstr($curdatabase, "-wireless.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
- /* define graphcmd for packets stats */
+ /* define graphcmd for wireless stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
$graphcmd .= "--start $start --end $end ";
$graphcmd .= "--vertical-label \"snr/channel/rate\" ";
@@ -927,6 +928,50 @@ function mail_report_generate_graph($database, $style, $graph, $start, $end) {
$graphcmd .= "COMMENT:\"\\n\" ";
$graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t`date +\"%b %d %H\:%M\:%S %Y\"`\" ";
}
+ elseif((strstr($curdatabase, "-mbuf.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
+ /* define graphcmd for mbuf usage stats */
+ $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
+ $graphcmd .= "--start $start --end $end ";
+ $graphcmd .= "--vertical-label \"utilization, percent\" ";
+ $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
+ $graphcmd .= "--title \"`hostname` - {$prettydb} clusters - {$hperiod} - {$havg} average\" ";
+ $graphcmd .= "--height 200 --width 620 ";
+ $graphcmd .= "DEF:\"current=$rrddbpath$curdatabase:current:AVERAGE\" ";
+ $graphcmd .= "DEF:\"cache=$rrddbpath$curdatabase:cache:AVERAGE\" ";
+ $graphcmd .= "DEF:\"total=$rrddbpath$curdatabase:total:AVERAGE\" ";
+ $graphcmd .= "DEF:\"max=$rrddbpath$curdatabase:max:AVERAGE\" ";
+ $graphcmd .= "LINE2:\"current#{$colormbuf[0]}:current\" ";
+ $graphcmd .= "LINE2:\"cache#{$colormbuf[1]}:cache\" ";
+ $graphcmd .= "LINE2:\"total#{$colormbuf[2]}:total\" ";
+ $graphcmd .= "LINE2:\"max#{$colormbuf[3]}:max\" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"\t\t minimum average maximum current\\n\" ";
+ $graphcmd .= "COMMENT:\"Current. \" ";
+ $graphcmd .= "GPRINT:\"current:MIN:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"current:AVERAGE:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"current:MAX:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"current:LAST:%7.2lf %S \" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"Cache. \" ";
+ $graphcmd .= "GPRINT:\"cache:MIN:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"cache:AVERAGE:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"cache:MAX:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"cache:LAST:%7.2lf %S \" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"Total. \" ";
+ $graphcmd .= "GPRINT:\"total:MIN:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"total:AVERAGE:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"total:MAX:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"total:LAST:%7.2lf %S \" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"Max. \" ";
+ $graphcmd .= "GPRINT:\"max:MIN:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"max:AVERAGE:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"max:MAX:%7.2lf %s \" ";
+ $graphcmd .= "GPRINT:\"max:LAST:%7.2lf %S \" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t`date +\"%b %d %H\:%M\:%S %Y\"`\" ";
+ }
elseif((strstr($curdatabase, "-queues.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
/* define graphcmd for queue stats */
$graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
diff --git a/config/mailreport/mail_reports_generate.php b/config/mailreport/mail_reports_generate.php
index c31909c9..55a23283 100644
--- a/config/mailreport/mail_reports_generate.php
+++ b/config/mailreport/mail_reports_generate.php
@@ -2,7 +2,7 @@
<?php
/* $Id$ */
/*
- mail_reports.inc
+ mail_reports_generate.php
Part of pfSense
Copyright (C) 2011 Jim Pingle <jimp@pfsense.org>
Portions Copyright (C) 2007-2011 Seth Mos <seth.mos@dds.nl>
diff --git a/config/mailreport/mailreport.xml b/config/mailreport/mailreport.xml
index 803e205b..1c6880bd 100644
--- a/config/mailreport/mailreport.xml
+++ b/config/mailreport/mailreport.xml
@@ -37,7 +37,7 @@
]]>
</copyright>
<name>mailreport</name>
- <version>2.1</version>
+ <version>2.2</version>
<title>Status: Email Reports</title>
<additional_files_needed>
<prefix>/usr/local/bin/</prefix>