graphite-project / graphite-web

A highly scalable real-time graphing system
http://graphite.readthedocs.org/
Apache License 2.0
5.88k stars 1.26k forks source link

[BUG] The holtWintersAberration() function fails with an IndexError exception #2762

Closed mux closed 1 year ago

mux commented 2 years ago

Describe the bug I'm trying to use the holtWintersAberration() function to detect anomalies, but it fails with a python exception. Here is the output I get from Grafana:

Traceback (most recent call last): File "/opt/graphite/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/graphite/webapp/graphite/errors.py", line 101, in new_f return f(*args, **kwargs)
File "/opt/graphite/webapp/graphite/render/views.py", line 130, in renderView data.extend(evaluateTarget(requestContext, targets))
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 34, in evaluateTarget result = evaluateTokens(requestContext, target) File "/opt/graphite/webapp/graphite/render/evaluator.py", line 67, in evaluateTokens return evaluateTokens(requestContext, tokens.expression, replacements)
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 102, in evaluateTokens args = [evaluateTokens(requestContext, arg, replacements) for arg in rawArgs]
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 67, in evaluateTokens return evaluateTokens(requestContext, tokens.expression, replacements)
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 128, in evaluateTokens return func(requestContext, *args, **kwargs) File "/opt/graphite/webapp/graphite/render/functions.py", line 4151, in holtWintersAberration elif upperBand[i] is not None and series[i] > upperBand[i]: IndexError: list index out of range

To Reproduce This has happened for every metric I tried this with, but I'm expecting that other people would see different values.

Expected behavior I expected the graph to be plotted.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

mux commented 2 years ago

For some reason this works with bootstrapInterval='3d'.

mux commented 2 years ago

Also, this doesn't happen on the holtWintersConfidenceBands() function with the exact same parameters.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.