| Cheshire Cat Computing http://www.steveshipway.org/forum/ |
|
| Uptime Display in Routers2 http://www.steveshipway.org/forum/viewtopic.php?f=2&t=1026 |
Page 1 of 1 |
| Author: | clensert [ Sat Dec 23, 2006 10:13 am ] |
| Post subject: | Uptime Display in Routers2 |
I would like to display the uptime of my routers somewhere under the graph display on a page. I added the following line to my CPU statistics target in the MRTG config file: RouterUptime[site_cpu]: public@1.1.1.1 I can't seem to find any place in Routers2 that displays the info anywhere easily. I don't want to graph the data, just add some text "Router uptime is:" and show the value. I suspect I will have to edit routers2.cgi to get this to work, but I don't know how to reference it, or if it's somewhat easy to do. Any help would be appreciated. |
|
| Author: | stevesh [ Mon Dec 25, 2006 3:17 pm ] |
| Post subject: | |
The short answer is the routers2 does not support this.... but keep reading. The reason it is not supported is in order to prevent the script from blocking when querying a device that is slow to respond or down. At the moment, everything can be cached and is only retrieved from the .rrd files, never directly from the device itself. Also, it is not always easy or possible to deduce what should be queried and how (remember that routers2 does not bother to completely parse the .cfg file, only those bits which are of use). The longer answer is that it is possible to do using an extension, but at the moment noone has written one. You could hook an extension in on the PageFoot[]: definition, either with an embedded image or an embedded iframe that calls a separate CGI script, passing the device FQDN and community. There are even symbols which are expanded by routers2 which can be used to create a generic URL. All of this, though, requires creation of a (small) script to do the necessary job. I'll add it to the Feature Request list to create sometihng like this, but if anyone else wants to try to do it, then I can pass on any required information. |
|
| Author: | clensert [ Tue Dec 26, 2006 3:53 pm ] |
| Post subject: | |
Thanks for the quick reply. I was looking into the PageFoot[]: definition initially and may play around a little to see if I can get it to work. Thanks for the input and keep up the great work! |
|
| Page 1 of 1 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|