|
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
|