← Back to team overview

graphite-dev team mailing list archive

Re: [Question #173946]: I can't make infinite lines drawn with drawAsInfinite() appear if I look at more than 24 hours of logs - should they?

 

Question #173946 on Graphite changed:
https://answers.launchpad.net/graphite/+question/173946

    Status: Open => Answered

chrismd proposed the following answer:
Your finest precision archive stops at 24h, and your xFilesFactor is 0.5
(which is the default). The xFilesFactor is the percentage of datapoints
that must be present in an aggregation window of a high precision
archive that is being rolled into a lower precision archive. So since
your second highest precision archive has 5 minute precision, it
considers the oldest 5 datapoints from the higest precision archive each
time it tries to do rollup aggregation. If less than 50% of those 5
datapoints are non-null, it propagates a null value to the lower
precision archive.

I imagine you are using drawAsInfinite the way many users do, by sending
a non-zero datapoint only when something special happens and not sending
a value otherwise. If you were to send 0's when nothing happened this
problem would go away because there wouldn't be null values and hence
the rollup aggregation would work fine. But since it's probably a pain
in the butt to do that (it often is), your next best alternative is to
lower the xFilesFactor to 0 so the nulls just get ignored.

This sounds terrible, but my suggestion for right now is to manually
hack whisper.py :). Seriously, I only suggest this because the
alternative is to a) update all the wsp files on your system plus keep
up with new wsp files as they get created, and b) you'd have to script
the update process since there isn't currently a tool to do it. It's
just changing one byte in a bunch of files, but still. If you hack
whisper.py as I explain in a moment, you can just wait until the next
release when this problem goes away. I have a new branch that is going
to become 0.9.10 in about a month that handles this by letting you apply
per-metric configurations in the database via rules that basically work
like storage-schemas.conf except generalized to apply arbitrary metadata
(so in addition to retentions, you can also set the xfilesfactor).

Here's the whisper hack, look in the __readHeader function around line
200 for:

info = {
  'aggregationMethod' : blah balh blah,
  'maxRetention' : blah blah,
  'xFilesFactor' : xff, # change this to 0
  'archives' : blah,
}

Change the xff to 0 and you're all set. If you update/reinstall whisper
of course this will go away, but hopefully the next update is to 0.9.10
when you can then re-fix it properly via the new storage-rules.conf.

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.