From f4b5466e72db3a059bdecc70e8b633984207d4f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20L=C3=B8vdal?= Date: Mon, 11 Apr 2016 21:41:59 +0200 Subject: [PATCH] Remove max_historic_years limitation --- man/man5/monitorix.conf.5 | 2 +- monitorix | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/man/man5/monitorix.conf.5 b/man/man5/monitorix.conf.5 index f2b75f7..f6dd762 100644 --- a/man/man5/monitorix.conf.5 +++ b/man/man5/monitorix.conf.5 @@ -124,7 +124,7 @@ This option defines the maximum number of years of historical data in all graphs .P WARNING: Every time this value is extended Monitorix will resize every \fI.rrd\fP file accordingly, removing all historical data. .P -The maximum allowed is 5. +There is no longer any upper limit for this value. .P Default value: \fI1\fP .RE diff --git a/monitorix b/monitorix index ce9236e..6a3d4c5 100755 --- a/monitorix +++ b/monitorix @@ -389,6 +389,10 @@ EOF print(OUT " \n"); } for($n = 2; $n <= $config{max_historic_years}; $n++) { + if($n > 2 && (($n - 2) % 4) == 0) { + print(OUT " \n"); + print(OUT " \n"); + } print(OUT < @@ -640,10 +644,6 @@ if(!$config{max_historic_years}) { logger("WARNING: the 'max_historic_years' option doesn't exist. Please consider upgrading your configuration file."); $config{max_historic_years} = 1; } -if($config{max_historic_years} > 5) { - logger("WARNING: the 'max_historic_years' option exceeds the maximum years permitted (5)."); - exit(0); -} if(!$config{image_format}) { logger("WARNING: the 'image_format' option is not valid or doesn't exist. Please consider upgrading your configuration file."); # it's set in 'monitorix.cgi'