summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/pfsense-utils.inc18
-rwxr-xr-xusr/local/www/status_rrd_graph.php3
-rw-r--r--usr/local/www/status_rrd_graph_img.php11
3 files changed, 22 insertions, 10 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index dff308d..186edef 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -2978,6 +2978,7 @@ function enable_rrd_graphing() {
$rrdcreate .= "RRA:AVERAGE:0.5:5:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:60:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:720:1000 ";
+ $rrdcreate .= "RRA:AVERAGE:0.5:1440:1500 ";
$rrdcreateoutput = array();
$rrdcreatereturn = "";
@@ -3014,6 +3015,7 @@ function enable_rrd_graphing() {
$rrdcreate .= "RRA:AVERAGE:0.5:5:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:60:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:720:1000 ";
+ $rrdcreate .= "RRA:AVERAGE:0.5:1440:1500 ";
$rrdcreatel = exec("$rrdcreate 2>&1", $rrdcreateoutput, $rrdcreatereturn);
if ($rrdcreatereturn != 0) {
@@ -3057,7 +3059,8 @@ function enable_rrd_graphing() {
$rrdcreate .= "RRA:AVERAGE:0.5:1:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:5:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:60:1000 ";
- $rrdcreate .= "RRA:AVERAGE:0.5:720:1000";
+ $rrdcreate .= "RRA:AVERAGE:0.5:720:1000 ";
+ $rrdcreate .= "RRA:AVERAGE:0.5:1440:1500 ";
$rrdcreatel = exec("$rrdcreate 2>&1", $rrdcreateoutput, $rrdcreatereturn);
if ($rrdcreatereturn != 0) {
@@ -3110,7 +3113,8 @@ function enable_rrd_graphing() {
$rrdcreate .= "RRA:AVERAGE:0.5:1:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:5:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:60:1000 ";
- $rrdcreate .= "RRA:AVERAGE:0.5:720:1000";
+ $rrdcreate .= "RRA:AVERAGE:0.5:720:1000 ";
+ $rrdcreate .= "RRA:AVERAGE:0.5:1440:1500 ";
$rrdcreatel = exec("$rrdcreate 2>&1", $rrdcreateoutput, $rrdcreatereturn);
if ($rrdcreatereturn != 0) {
@@ -3133,7 +3137,8 @@ function enable_rrd_graphing() {
$rrdcreate .= "RRA:AVERAGE:0.5:1:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:5:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:60:1000 ";
- $rrdcreate .= "RRA:AVERAGE:0.5:720:1000";
+ $rrdcreate .= "RRA:AVERAGE:0.5:720:1000 ";
+ $rrdcreate .= "RRA:AVERAGE:0.5:1440:1500 ";
$rrdcreatel = exec("$rrdcreate 2>&1", $rrdcreateoutput, $rrdcreatereturn);
if ($rrdcreatereturn != 0) {
@@ -3213,6 +3218,7 @@ function enable_rrd_graphing() {
$rrdcreate .= "RRA:AVERAGE:0.5:5:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:60:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:720:1000 ";
+ $rrdcreate .= "RRA:AVERAGE:0.5:1440:1500 ";
$rrdcreatel = exec("$rrdcreate 2>&1", $rrdcreateoutput, $rrdcreatereturn);
if($rrdcreatereturn != 0) {
@@ -3251,6 +3257,7 @@ function enable_rrd_graphing() {
$rrdcreate .= "RRA:AVERAGE:0.5:5:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:60:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:720:1000 ";
+ $rrdcreate .= "RRA:AVERAGE:0.5:1440:1500 ";
$rrdcreatel = exec("$rrdcreate 2>&1", $rrdcreateoutput, $rrdcreatereturn);
if($rrdcreatereturn != 0) {
@@ -3296,14 +3303,17 @@ function enable_rrd_graphing() {
$rrdcreate .= "RRA:MIN:0.5:5:1000 ";
$rrdcreate .= "RRA:MIN:0.5:60:1000 ";
$rrdcreate .= "RRA:MIN:0.5:720:1000 ";
+ $rrdcreate .= "RRA:MIN:0.5:1440:1500 ";
$rrdcreate .= "RRA:AVERAGE:0.5:1:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:5:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:60:1000 ";
$rrdcreate .= "RRA:AVERAGE:0.5:720:1000 ";
+ $rrdcreate .= "RRA:AVERAGE:0.5:1440:1500 ";
$rrdcreate .= "RRA:MAX:0.5:1:1000 ";
$rrdcreate .= "RRA:MAX:0.5:5:1000 ";
$rrdcreate .= "RRA:MAX:0.5:60:1000 ";
- $rrdcreate .= "RRA:MAX:0.5:720:1000";
+ $rrdcreate .= "RRA:MAX:0.5:720:1000 ";
+ $rrdcreate .= "RRA:MAX:0.5:1440:1500 ";
$rrdcreatel = exec("$rrdcreate 2>&1", $rrdcreateoutput, $rrdcreatereturn);
if ($rrdcreatereturn != 0) {
diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php
index f5e4459..96efa1e 100755
--- a/usr/local/www/status_rrd_graph.php
+++ b/usr/local/www/status_rrd_graph.php
@@ -75,6 +75,7 @@ $databases = array_merge($dbheader, $databases);
$styles = array('inverse' => 'Inverse',
'absolute' => 'Absolute');
+$periods = array("4h", "16h", "48h", "32d", "6m", "1y", "4y");
$pgtitle = gettext("Status: RRD Graphs");
include("head.inc");
@@ -169,8 +170,6 @@ include("head.inc");
<?php
- $periods = array("4h", "16h", "48h", "32d", "6m", "16m");
-
foreach($periods as $period => $interval) {
/* check which databases are valid for our category */
foreach($databases as $curdatabase) {
diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php
index c7cbe85..fdf07a9 100644
--- a/usr/local/www/status_rrd_graph_img.php
+++ b/usr/local/www/status_rrd_graph_img.php
@@ -56,7 +56,7 @@ $search = array("-", ".rrd", $curif);
$replace = array(" :: ", "", $friendly);
$prettydb = ucwords(str_replace($search, $replace, $curdatabase));
-$periods = array("4h", "16h", "48h", "32d", "6m", "16m");
+$periods = array("4h", "16h", "48h", "32d", "6m", "1y", "4y");
$found = 0;
foreach($periods as $period) if($period == $interval) $found = 1;
@@ -80,9 +80,12 @@ $graphs['32d']['scale'] = "DAY:1:WEEK:1:WEEK:1:0:Week %W";
$graphs['6m']['seconds'] = 16070400;
$graphs['6m']['average'] = 43200;
$graphs['6m']['scale'] = "WEEK:1:MONTH:1:MONTH:1:0:%b";
-$graphs['16m']['seconds'] = 42854400;
-$graphs['16m']['average'] = 43200;
-$graphs['16m']['scale'] = "MONTH:1:MONTH:1:MONTH:1:0:%b";
+$graphs['1y']['seconds'] = 31622400;
+$graphs['1y']['average'] = 43200;
+$graphs['1y']['scale'] = "MONTH:1:MONTH:3:MONTH:1:0:%b";
+$graphs['4y']['seconds'] = 126489600;
+$graphs['4y']['average'] = 86400;
+$graphs['4y']['scale'] = "MONTH:1:YEAR:1:MONTH:3:0:%b";
/* generate the graphs when we request the page. */
$seconds = $graphs[$interval]['seconds'];
OpenPOWER on IntegriCloud