Hi,
I’m trying to define alerts for some of the graphs in Grafana. I get:
error tsdb.HandleRequest() error Request failed status: 500 Internal Server Error
every time when I press “Test Rule” button.
My queries are the most basic ones - like “WHEN avg () OF query (A, 5m, now) IS ABOVE 10”, etc.
/opt/graphite/storage/log/webapp/exception.log tells me the following when that happens:
2017-06-13,09:27:37.044 :: Exception encountered in <POST http://localhost:80/render>
Traceback (most recent call last):
File “/usr/lib64/python2.7/site-packages/django/core/handlers/base.py”, line 147, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/opt/graphite/webapp/graphite/render/views.py”, line 124, in renderView
seriesList = evaluateTarget(requestContext, target)
File “/opt/graphite/webapp/graphite/render/evaluator.py”, line 8, in evaluateTarget
result = evaluateTokens(requestContext, tokens)
File “/opt/graphite/webapp/graphite/render/evaluator.py”, line 29, in evaluateTokens
return evaluateTokens(requestContext, tokens.expression, replacements)
File “/opt/graphite/webapp/graphite/render/evaluator.py”, line 54, in evaluateTokens
args = [evaluateTokens(requestContext, arg, replacements) for arg in tokens.call.args]
File “/opt/graphite/webapp/graphite/render/evaluator.py”, line 29, in evaluateTokens
return evaluateTokens(requestContext, tokens.expression, replacements)
File “/opt/graphite/webapp/graphite/render/evaluator.py”, line 54, in evaluateTokens
args = [evaluateTokens(requestContext, arg, replacements) for arg in tokens.call.args]
File “/opt/graphite/webapp/graphite/render/evaluator.py”, line 29, in evaluateTokens
return evaluateTokens(requestContext, tokens.expression, replacements)
File “/opt/graphite/webapp/graphite/render/evaluator.py”, line 59, in evaluateTokens
return func(requestContext, *args, **kwargs)
File “/opt/graphite/webapp/graphite/render/functions.py”, line 2198, in highestAverage
return sorted( seriesList, key=lambda s: safeDiv(safeSum(s),safeLen(s)) )[-n:]
TypeError: bad operand type for unary -: ‘list’
I’ve had this problem with Grafana 4.0.2 + Graphite 0.9.13 and I still have it now on Grafana 4.3.2 + Graphite 1.0.1.
Any ideas?
Kamil