Closed miloszszymczak closed 6 years ago
What values does myproject.prod.*.*.timers.app.view.myproject.api.views.MyProjectQuery.POST.mean_99
report around that time? Perhaps we're not handling Nones properly in summarize()
(I doubt it, just taking a stab in the dark).
As shown on the picture, there are some null values, but usually everything's fine even with them, error shows up at random while Grafana auto-update.
[null, 1402905000], [null, 1402905600], [null, 1402906200], [null, 1402906800], [null, 1402907400], [null, 1402908000], [null, 1402908600], [null, 1402909200], [null, 1402909800], [null, 1402910400], [null, 1402911000], [null, 1402911600], [null, 1402912200], [null, 1402912800], [2.1949026000000003, 1402913400], [2.1984015666666665, 1402914000], [2.2147782333333335, 1402914600], [2.1966841999999995, 1402915200], [2.1873180000000003, 1402915800], [2.224719733333333, 1402916400],
It makes no sense that this happens irregularly. Can you take a look at the specific request that's failing and see if the request looks different than expected? Hint: use the web inspector.
/cc @torkelo in case this is a Grafana issue somehow.
Strange, grafana should send the same query every time when auto refresh. The query is built only when you use the query editor. The error looks strange, given the query. It complains about the aliasByNode parameters must be integers, and they are, it is the summarize parameters that are strings. It almost seems like a threading or caching issue.
aliasByNode(summarize(myproject.prod...timers.app.view.myproject.api.views.MyProjectQuery.POST.mean_99, "10min", "max"), 2,3)
As I wrote above - because of some glitch aliasByNode receives ("10min", "max") tuple instead of (2, 3) as arguments - I logged it right from the function. That's why it complains about non-integer indices.
Do you have any ideas on how I can debug it? I have access to the code and since the error appears several times a day, I can log any information you need to find out what's happening.
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/opt/graphite/webapp/graphite/render/views.py" in renderView
113. seriesList = evaluateTarget(requestContext, target)
File "/opt/graphite/webapp/graphite/render/evaluator.py" in evaluateTarget
10. result = evaluateTokens(requestContext, tokens)
File "/opt/graphite/webapp/graphite/render/evaluator.py" in evaluateTokens
21. return evaluateTokens(requestContext, tokens.expression)
File "/opt/graphite/webapp/graphite/render/evaluator.py" in evaluateTokens
29. return func(requestContext, *args)
File "/opt/graphite/webapp/graphite/render/functions.py" in aliasByNode
1022. series.name = '.'.join(metric_pieces[n] for n in nodes)
File "/opt/graphite/webapp/graphite/render/functions.py" in <genexpr>
1022. series.name = '.'.join(metric_pieces[n] for n in nodes)
Exception Type: TypeError at /render
Exception Value: list indices must be integers, not str
POST
format u'json'
from u'-24h'
target u"aliasByNode(summarize(share.prod.{ams,os}.{db1,db2,faviconer1,faviconer2,front1,front2}.gauges.memory.MemFree,'10min','max'),2,3)"
maxDataPoints u'424'
until u'now'
@miloszszymczak @mlowicki sorry if I've missed it somewhere above but can you please advise the exact graphite-web version you are running?
Hi. I use Graphite along with Grafana and sometimes while auto-update of graphs I encounter this error:
I logged some information and it appears, that before the error appears, aliasByNode function receives tuple ("10min", "max") instead of (2, 3). What may be causing it?