[hobbit] Multiple timezone display

Henrik Stoerner henrik at hswn.dk
Mon Nov 21 23:01:46 CET 2005


On Mon, Nov 21, 2005 at 09:51:07AM -0800, Bob Gordon wrote:
> 
> The systems that we monitor are across multiple time zones. The local admins
> however are insisting that the pages be displayed in a timezone local to
> them instead of the GMT zone that the monitoring system is using.
> 
> Is there a way to add a second timezone to the display or change the
> timezone that the graphs are displayed in (without changing the TZ of the
> maonitoring station)? As a correlary to this, is there anyway to have the
> grapsh displayed in multiple time zones?

It's mostly possible, but it will require some tweaking.


First, you must figure out exactly which timestamps you want to
localize. 

A Hobbit overview page (the one listing your hosts) looks like this:

   Hobbit          Current Status       Mon Nov 21 22:32:24 2005

                  cpu   disk   http   memory
        hostA      X     X      X       X

There's only one timestamp here: The one in the top right corner.
This is generated by bbgen when it builds these webpages; since 
bbgen runs on the Hobbit server, it will pick up the local timezone
setting for the Hobbit server and use that. This can be changed,
but doing so would require that you build the Hobbit webpages
once for every timezone you want to support - and place them in 
separate web directories, each with their URL. It would be easier
if these pages were generated dynamically, but alas - that is not
the case currently (but that might change - I am currently working
on a new "NK" page which is dynamically generated, and I would really
prefer if all of the Hobbit webpages were built on-the-fly).


Next is the detailed status view - what you see when you click
one of the status icons. It often looks like this

   Hobbit           hostA - telnet       Mon Nov 21 22:32:24 2005

             Mon Nov 21 22:32:24 2005 telnet OK

               ------------------------------
	       |     The hobbit graph       |
               ------------------------------

This webpage is generated dynamically by the hobbitsvc.cgi CGI 
script, and you could set the timezone when running that to modify the
way times are displayed. The timestamp in the upper right corner is
generated by hobbitsvc.cgi, but the one to the left of the "telnet OK"
message is NOT - that timestamp actually comes from the host that
reported this status, which could be the Hobbit server running the
network tests, or an single host running a client-side test. Changing
that timestamp on-the-fly will be very difficult, since it is really
just part of the status message that was reported to Hobbit.

The Hobbit graphs are also dynamically generated by the hobbitgraph.cgi, 
so those could be customized.


Last there are a couple of reporting webpages where can enter absolute
date/time - like the eventlog report where you can choose to show
which events occurred between two absolute times. If you want to change
these, I guess it can be done by setting the timezone when the CGI 
that runs these reports is invoked.


So what most of it comes down to is some way for the Hobbit webserver to
figure out what timezone you'd like the webpages to use. I guess it
could be placed into some web "cookie" that would be passed around while
the user browses the Hobbit webpages, but you would need to modify the
CGI programs to pick this up and modify the timezone it uses.


I am fortunate to live in a single-timezone country, so I haven't had
this problem; but I can understand that it might be an issue when you
are monitoring systems placed in different timezones. So I am perfectly
willing to look at implementing this if enough people say that it will
be useful.


Regards,
Henrik




More information about the Xymon mailing list