Graphite not loading the "from" parameter

Asked by Jason Dixon on 2012-06-08

I've started seeing a problem with our graphite.db where the URL loaded does not match the URL saved. I first noticed it when I tried to adjust the time range and it wouldn't save the changes. I confirmed that the URL is being saved correctly in the database. Here is the entry:

1|1|Carbon_Performance|https://graphite/render/?_salt=1339122540.873&target=alias(color(sumSeries(group(carbon.agents.*.committedPoints))%2C%22orange%22)%2C%22Committed%20Points%22))&target=alias(color(sumSeries(group(carbon.agents.*.updateOperations))%2C%20%22blue%22)%2C%22Updates%22)%20&target=alias(color(sumSeries(group(carbon.agents.*.metricsReceived))%2C%20%22green%22)%2C%20%22Metrics%20Received%22)&target=alias(secondYAxis(color(sumSeries(group(carbon.agents.*.pointsPerUpdate))%2C%22yellow%22))%2C%22Points%20per%20Update%22)&target=alias(secondYAxis(color(averageSeries(group(carbon.agents.*.cpuUsage))%2C%22red%22))%2C%22CPU%20(avg)%22)&target=alias(secondYAxis(color(sumSeries(group(carbon.agents.*.creates))%2C%22purple%22))%2C%22Creates%22)&width=586&height=308&from=-1hours

But when I load the graph in the composer, this is what I'm getting:

https://graphite/render/?_salt=1339123325.204&target=alias(color(sumSeries(group(carbon.agents.*.committedPoints))%2C%22orange%22)%2C%22Committed%20Points%22))&target=alias(color(sumSeries(group(carbon.agents.*.updateOperations))%2C%20%22blue%22)%2C%22Updates%22)%20&target=alias(color(sumSeries(group(carbon.agents.*.metricsReceived))%2C%20%22green%22)%2C%20%22Metrics%20Received%22)&target=alias(secondYAxis(color(sumSeries(group(carbon.agents.*.pointsPerUpdate))%2C%22yellow%22))%2C%22Points%20per%20Update%22)&target=alias(secondYAxis(color(averageSeries(group(carbon.agents.*.cpuUsage))%2C%22red%22))%2C%22CPU%20(avg)%22)&target=alias(secondYAxis(color(sumSeries(group(carbon.agents.*.creates))%2C%22purple%22))%2C%22Creates%22)&width=586&height=308

Any ideas?

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Jason Dixon
Solved:
2012-06-09
Last query:
2012-06-09
Last reply:
2012-06-09
Jason Dixon (jason-dixongroup) said : #1

It appears that a more accurate description of this issue would be that Graphite is not loading the "from" parameter at all. All graphs are loading without the "from" parameter and viewing the 24hr range by default.

Jason Dixon (jason-dixongroup) said : #2

Note: this is on a new (not upgraded) 0.9.10 server. The only stuff that came across from the old server was configuration files and our whisper data.

Michael Leinartas (mleinartas) said : #3

This was a bug with how the query string was processed. It actually stripped all parameters except for 'target'. The fix is small and is now in the 0.9.x branch as well as master: https://github.com/graphite-project/graphite-web/commit/de3f08c8157e75eadba80bc09eaa07201fa396ce

Jason Dixon (jason-dixongroup) said : #4

Awesome, thanks!

wingZero (devestator21) said : #5

Hi,

When saving the graph in the Graphite composer currently on 0.9.10 it does not seem to be saving the times on saved graphs.

Tried amending the composer.js to the amend specified above however it brings back the following error now.

Details:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/graphite/webapp/graphite/render/views.py", line 45, in renderView
    (graphOptions, requestOptions) = parseOptions(request)
  File "/usr/local/graphite/webapp/graphite/render/views.py", line 239, in parseOptions
    fromTime = parseATTime( queryParams['from'] )
  File "/usr/local/graphite/webapp/graphite/render/attime.py", line 45, in parseATTime
    return tzinfo.localize(parseTimeReference(ref), daylight) + parseTimeOffset(offset)
  File "/usr/local/graphite/webapp/graphite/render/attime.py", line 119, in parseTimeReference
    raise Exception, "Unknown day reference"
Exception: Unknown day reference