[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Cheshire Cat Computing • View topic - 5-year graph

Cheshire Cat Computing

Software support and information
It is currently Sun Sep 20, 2020 10:56 pm

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: 5-year graph
PostPosted: Wed Oct 24, 2012 8:05 am 
Offline
Silver User

Joined: Tue Sep 18, 2012 10:02 pm
Posts: 46
Hi Steve,

is there a possibility to add a 5-year graph? (Like used on: )
Since in some cases I think the 1-year graph is not enough.

I know, this would require to change the size of the RRD files, correct? But maybe I can ask Tobi to change the default behavior of MRTG and RRD to use this little bigger format? :D

Thanks a lot!

Gerch


Top
 Profile Send private message  
 
 Post subject: Re: 5-year graph
PostPosted: Mon Dec 31, 2012 2:12 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
The default MRTG-create RRD files only have 2 years of data in them, so a 5y graph would not normally be workable. Adding the option would mean having to make tests on data availability, and this would mean a lot of work in the current routers2 structure (unless you skip all the tests and serve up the option anyway, relying on the user to ensure the data are available, as we do in the extendedtime=yes option)

There are plans for 'routers3' which would use more of an ajaxy setup, making it much easier to have more predefined graph widths and custom styles. This is a long way off, though.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject: Re: 5-year graph
PostPosted: Tue Feb 19, 2013 5:14 am 
Offline
Silver User

Joined: Tue Sep 18, 2012 10:02 pm
Posts: 46


Top
 Profile Send private message  
 
 Post subject: Re: 5-year graph
PostPosted: Tue Feb 19, 2013 2:15 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
The rrd files, as created by MRTG, only hold data for a maximum of two years (actually, about 800 days). So, you would need to manually use 'RRDtool tune' to extend the relevant RRAs in order to even have the data available for 5 years.

The next thing to do would be to create a '5' type graph definition, along with the d/w/m/y types. This would need to be done in many places, since there are many chacks for [dwmy] which would need ot be extended to [dwmy5]. Also, youd need to add a section in the javascript to handle this (for actuals popup) and set the appropriate data widths.

An alternative way to do it would be to use a graph style suffix - currently, there is 'D' for double width data (a 2year graph) and H for half-width (a 6month graph). Maybe add a 'F' suffix for five-times data width (this would mean 'daily' graphs show 5 days, yearly show 5 years, etc). This would be the simplest way to do it, but you'd need to extend all 8 RRAs in every RRD file to 2.5 times their current length (IE, add 1200 rows to make a total of 2000 rows). If you do this, you'd need to have your new style (eg: 'x3F' added in the sorder definition in the routers2.conf, and give it a default description in the %gstyles hash in the initlabels function of routers2.cgi. Then you'd have to edit graphpopupscript() to add '$stretch*=5 if($gstyle=~/F/);' and make_graph() to add 'elsif($gstyle=~/F/) { $width*=5; }' to make the data width increase in these two cases.

You can see how the /D/, /H/ and /Q/ suffixes are handled and do it that way.

The problem with all this, of course, is that it only handles one case and makes no allowances for when someone has not extended their RRAs.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject: Re: 5-year graph
PostPosted: Wed Feb 20, 2013 3:52 am 
Offline
Silver User

Joined: Tue Sep 18, 2012 10:02 pm
Posts: 46
Hm, okay, I see that it is not that easy :(
Thanks for your detailed post anyway. I will investigate the second suggestion and will see whether it is worth the trouble to realize it.

Gerch


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group