Closed Simage closed 9 years ago
As far as I understand, the 0858 comes from the WebUI when it requests graphs from its graph module. The graphs are requested with a start and end range. See eltdetail.tpl, around lines 1130 and lines 1160 ...
It will be interesting to change this behavior if the ui-graphite and ui-pnp modules were able to provide an interface with a duration rather than with a fixed range ...
I will propose a modification in the WebUI to remove the fixed date range.
@Simage : I made some modifications in the WebUI to use only durations for graphs (see my latest commits). The idea is that the WebUI do not set start/end date anymore, but requests for the last 24 hours ...
If the ui-graphite module implements a _get_relative_graphuris function this function is called with the requested duration, else the _get_graphuris function is called with start/end date computed with the duration and time.time().
I will also commit a modification in the refactored branch of ui-graphite for the _get_relative_graphuris function ...
The get graphs url should work as is... the design behind it is to convert a unix timestamp to a compliant string and just pass anything else through. My bigger concern is for those using other graphing backends. Particularly pnp, does it support relative times, or will this change beak graphs for people using PNP
Actually.. you're doing something slightly different than I expected... I'll put together an alternate when I get to the office.. 10 or 15 minutes
Please feel free to make some modifications ... no problem with this. I simply proposed something that will allow the WebUI to not use absolute time.
I was thinking something more like Simage/mod-webui@cb20b3069adcd08ebf07cd1f3b3a2f2d5c02d726
1 minute untested example, I'll try fleshing it out more when I get home tonight
@Simage : any news about this issue ?
I have a solution thats working for us internally at this time, not quite certain how safe it is to integrate into mainline tho...
On 01/09/15 11:21 AM, Frédéric MOHIER wrote:
@Simage https://github.com/Simage : any news about this issue ?
— Reply to this email directly or view it on GitHub https://github.com/shinken-monitoring/mod-webui/issues/284#issuecomment-136801873.
So I close
Graphs appear to be generating timestamps in GMT+0200
generated graph url for the 4 hour graph is
local time is GMT-0600 = 0058 Server time is GMT+0000 = 0658 until time in graph URL = 0858
Of course since the timezone in the URL is set at America/Edmonton (GMT+0600) the times are all apparently in the future and no graph is generated
Math all appears to be done in UTC, so where is the 0858 coming from?
Easiest solution may be to just use relative times and lose the absolute times. the above url would then read
which does work, however other graphing engines may not support this format. possibly force the graph module to convert from relative to absolute if the backing engine does not support relative times?