[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/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 - customizations

Cheshire Cat Computing

Software support and information
It is currently Mon Nov 10, 2025 7:12 am

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: customizations
PostPosted: Tue Jan 06, 2009 6:17 am 
Offline
User

Joined: Thu Dec 04, 2008 6:14 am
Posts: 5
Steve,

I have some questions on customizing the default Target page. First, when I click on a Target I get the daily graph page. I would like to have the All Graphs page displayed instead. I've set the graphtype directive to dwmy in routers2.conf and set the Preferences to All Graphs but it's still only showing the daily graph.

Also, I'd like to put a title on each of the graphs to tell what they are (e.g. "Daily Graph", "Weekly Graph", etc.) and separate them with an horizontal rule <hr>. Right now the All Graphs page displays with spacing between the graphs. A title would be helpful for management-types looking at page.

I would also like to put the "last updated" line above the graphs that includes a line showing how long it's been up.

So, below is how I would like to present it (essentially the way MRTG displays it).

Thanks for all the work. I purchased your book and reference and they've REALLY helped A LOT!

Carlos

System:
Maintainer:
etc... (this is displaying fine)
horiz rule
last updated
uptime
horiz rule
daily graph with title
horiz rule
rest of graphs.


Top
 Profile Send private message  
 
 Post subject: Re: customizations
PostPosted: Tue Jan 06, 2009 10:27 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
Several questions there! I'll deal with them in order...

1. Defaulting to 'All Graphs'.
This should be possible in the ways you give - either using 'Personal Preferences' or setting 'graphtype' in the routers2.conf. This works for me on v2.20b3 (and should work on v2.19 and previously too) although there are a few caveats. First, remember that 'All Graphs' mode is not valid for summary pages and so if your default Target is a summary page then it will fall back to Daily. Also, make sure you've set it to 'dwmy' (and not 'dmwy' or similar).

2. Placing a title on the graphs
You can of course use the PageTop (if enabled in the routers2.conf with mrtgpagetop=y) to add a special title to the top of the screen, but this does not specify the daily/weekly etc. As I understand it, you want an additional title above the graph image when in All Graphs mode to state 'Daily' etc. This is a good idea, and I'll see if I can add it for v2.20.

3. System uptime.
This is much more complex that you'd think. MRTG obtains this information while it queries the data - either via SNMP or plugin - and does not store it anywhere other than to write it to the HTML files if in Native mode. The only way Routers2 could do it would be to make additional SNMP queries - and this would not help in plugin Targets. It would also cause big performance problems if the device was down, or denied SNMP queries to the Routers2 server (might happen in distributed configurations). This is why Routers2 does not make ANY SNMP queries at the moment, allowing plugins to do this if required. I've thought of various ways to try and achieve it- such as using the PageFoot to hold an IFRAME tag which calls a separate CGI with the hostname and community so that it can output the uptime, if possible - but they all have issues.

4. Your layout.
I should be able to get the 'last updated' time formatted human-readable into a symbol, so you'll be able to get this into your PageTop definition as a variable. You can already use %LASTUPDATE% but this is a UNIX timestamp so not as helpful.
As I mentioned before, adding %UPTIME% will be hard; possibly I will make some sort of symbol like %SNMP:xxxx% where xxxx is an OID to query, but this will have some nasty effects if the device is down. Adding an HR and 'Daily' etc for each graph when there are multiple ones shouldnt be too hard to do, as well.

5. Book
Glad you like the book, and find it useful - and thanks for buying a copy! 110 sold so far... OK so I'm not as successful as JKR but it all helps. Updates will come out as the software updates, and I'll put errata and addenda online in the appropriate fora. A second book, on RRDtool programming, is in the pipeline.

6. Other
Version 2.20beta3 of Routers2 supports several more symbols, including userdefined ones which can be set to things like the System Name via cfgmaker host templates. Things like a human-readable Last Update time and descriptive Graph Type/Style are available, which are probably more of interest to you. Also, I've put in code to label the graphs with the Type name if you're looking at more than one (such as in All Graphs mode).

Steve

_________________
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: customizations
PostPosted: Sat Jan 17, 2009 3:40 am 
Offline
Silver User

Joined: Sun Jul 23, 2006 7:17 am
Posts: 14
Hey Steve,

Continuing on with this "All Graphs" theme... I'm using v2.20beta2 and attempted to use graphtype=6dwmy, but it defaults back to just displaying the daily graph. Is it at all possible to make this available in the future?

Thanks,
Adam


Top
 Profile Send private message  
 
 Post subject: Re: customizations
PostPosted: Sun Jan 18, 2009 10:41 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
It reverts back to daily because 6dwmy wasnt defined as a valid code - however, theres no reason it shouldnt be. Really, the dwmy code should be replaced by 6dwmy if we're in '6hour' mode, at the same time that '6' and '6-' are added. This meansa bit more testing (cant just add 6dwmy' to the list sadly). Also, the language packs would probably need to be modified to have 6dwmy with the same description 'All Graphs' as dwmy.
Can probably get this into 2.20b3 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: customizations
PostPosted: Tue Jan 20, 2009 2:39 am 
Offline
Silver User

Joined: Sun Jul 23, 2006 7:17 am
Posts: 14
Hey Steve,

Yeah...it was more of an off-hand "oh, I noticed.." than anything. I'll have to start submitting patches, with some less-than-embarassing code that I currently have, that just works(tm).

-
Adam


Top
 Profile Send private message  
 
 Post subject: Re: customizations
PostPosted: Tue Jan 20, 2009 11:25 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
Its actually rather awkward to make it automatically change the dwmy graph option to 6dwmy if we have 6hour enabled and the currently viewed RRD is 1-min interval. Things fall afoul of the sanity-check code. I'll see what I can do for v2.20

_________________
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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 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