-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Being a very new user of Graphite, it is possible that this is purely user (my) error, but I have reviewed the documentation and also done some testing.
The documentation for the render API states that from and until query values can use human-friendly expressons like "6pm+yesterday" and "noon+today". The latter form works fine, but the former always throws an error.
For example, this works:
...&from=noon+today&until=noon+tomorrow...
But this fails:
&from=4pm+today&until=noon+tomorrow
with this error:
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 "/opt/graphite/webapp/graphite/render/views.py", line 51, in renderView
(graphOptions, requestOptions) = parseOptions(request)
File "/opt/graphite/webapp/graphite/render/views.py", line 264, in parseOptions
untilTime = parseATTime(queryParams['until'], tzinfo)
File "/opt/graphite/webapp/graphite/render/attime.py", line 41, in parseATTime
return tzinfo.localize(parseTimeReference(ref), daylight) + parseTimeOffset(offset)
File "/opt/graphite/webapp/graphite/render/attime.py", line 115, in parseTimeReference
raise Exception, "Unknown day reference"
Exception: Unknown day reference
Similarly, this type of error occurs with only historical from/until references as well if trying to use a time like "6pm" or "9am", but the friendly name "noon" works - other friendly names like "teatime" also fail the same way.