carbon icon indicating copy to clipboard operation
carbon copied to clipboard

Errors in Megacarbon rollup plugin

Open rowanu opened this issue 13 years ago • 5 comments

Am sometimes seeing this error:

[Fri Dec 21 01:50:45 2012]  node_found :: (<CeresNode[0x21b3940]: statsd.numStats>,)
[Fri Dec 21 01:54:05 2012]  --- Error in node_found event-handler ---
[Fri Dec 21 01:54:05 2012]  Traceback (most recent call last):
  File "bin/ceres-maintenance", line 95, in dispatch
    handler(*args, **kwargs)
  File "/opt/graphite/plugins/maintenance/rollup.py", line 51, in node_found
    do_rollup(node, archive, archives[i+1])
  File "/opt/graphite/plugins/maintenance/rollup.py", line 86, in do_rollup
    coarseValue = aggregate(node, fineDatapoints)
  File "/opt/graphite/plugins/maintenance/rollup.py", line 14, in aggregate
    return float(sum(values)) / len(values) # values is guaranteed to be nonempty
TypeError: unsupported operand type(s) for +: 'float' and 'NoneType'

Will look in to it.

rowanu avatar Dec 21 '12 02:12 rowanu

I think this is because my storage rules are leaving lots of empty values.

rowanu avatar Dec 21 '12 02:12 rowanu

Yeah this appears to be something that needs to be implemented in the rollup.py maintenance. It supports the xFilesFactor option in storage-rules and IIRC the metadata is stored correctly in Ceres, it's just not actually used. It should work like it does in whisper: https://github.com/graphite-project/whisper/blob/master/whisper.py#L477-L478 Filtering out None values and aggregating if the percentage of points with values is greater than the xFilesFactor, and writing a None if not.

mleinart avatar Jan 30 '13 06:01 mleinart

Thanks for the explanation. Just testing before sending the pr.

rowanu avatar Feb 22 '13 20:02 rowanu

can this issue be closed? it looks like PR#107 took care of the issue.

joemiller avatar Aug 11 '13 03:08 joemiller

Seems to be fixed a long time ago, closing.

piotr1212 avatar Jan 11 '19 20:01 piotr1212