y axis log scale can't hangle zero values

Bug #925635 reported by Geoff Flarity
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Graphite
Fix Released
Medium
Unassigned

Bug Description

I realize the math issues, but it seems like there should be away to have a logarithmic scale with a zero value in the dataset. Maybe just ignore them?

Revision history for this message
Michael Leinartas (mleinartas) wrote :

Here's the error given when a dataset with 0 is used.

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.6/site-packages/graphite/render/views.py", line 171, in renderView
    image = doImageRender(requestOptions['graphClass'], graphOptions)
  File "/usr/lib/python2.6/site-packages/graphite/render/views.py", line 349, in doImageRender
    img = graphClass(**graphOptions)
  File "/usr/lib/python2.6/site-packages/graphite/render/glyph.py", line 178, in __init__
    self.drawGraph(**params)
  File "/usr/lib/python2.6/site-packages/graphite/render/glyph.py", line 610, in drawGraph
    self.setupYAxis()
  File "/usr/lib/python2.6/site-packages/graphite/render/glyph.py", line 974, in setupYAxis
    raise GraphError('Logarithmic scale specified with a dataset with a '
GraphError: Logarithmic scale specified with a dataset with a minimum value less than or equal to zero

Changed in graphite:
milestone: none → 0.9.10
status: New → Confirmed
Revision history for this message
Nicholas Leskiw (nleskiw) wrote :

tested r712, 0 values are ignored on log scale. If anyone can still cause an error, please reopen the bug.

Changed in graphite:
status: Confirmed → Fix Committed
importance: Undecided → Medium
Revision history for this message
Mike Zupan (u6pb) wrote :

I can re-create this problem with data we have.. if I set a graph to the last 6 hours.. it is fine.. anything more then that I get the

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/opt/graphite/webapp/graphite/render/views.py", line 166, in renderView
    image = doImageRender(requestOptions['graphClass'], graphOptions)
  File "/opt/graphite/webapp/graphite/render/views.py", line 338, in doImageRender
    img = graphClass(**graphOptions)
  File "/opt/graphite/webapp/graphite/render/glyph.py", line 174, in __init__
    self.drawGraph(**params)
  File "/opt/graphite/webapp/graphite/render/glyph.py", line 515, in drawGraph
    self.setupYAxis()
  File "/opt/graphite/webapp/graphite/render/glyph.py", line 824, in setupYAxis
    raise GraphError('Logarithmic scale specified with a dataset with a '
GraphError: Logarithmic scale specified with a dataset with a minimum value less than or equal to zero

Revision history for this message
Michael Leinartas (mleinartas) wrote :

Hmm, I'm somewhat unsure about making this change. Perhaps a solution would be to filter the series through removeBelowValue() first?

Revision history for this message
Nicholas Leskiw (nleskiw) wrote : Re: [Bug 925635] Re: y axis log scale can't hangle zero values

What are the retention rates on the datafile that errors out?
I'm wondering if this has to do with the aggregation boundary...

-Nick

On Fri, Apr 6, 2012 at 1:11 PM, Michael Leinartas <<email address hidden>
> wrote:

> Hmm, I'm somewhat unsure about making this change. Perhaps a solution
> would be to filter the series through removeBelowValue() first?
>
> --
> You received this bug notification because you are subscribed to
> Graphite.
> https://bugs.launchpad.net/bugs/925635
>
> Title:
> y axis log scale can't hangle zero values
>
> Status in Graphite - Enterprise scalable realtime graphing:
> Fix Committed
>
> Bug description:
> I realize the math issues, but it seems like there should be away to
> have a logarithmic scale with a zero value in the dataset. Maybe just
> ignore them?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/graphite/+bug/925635/+subscriptions
>

Changed in graphite:
status: Fix Committed → Fix Released
Revision history for this message
Nemo_bis (nemobis) wrote :

Mike Zupan, how did you solve your problem, was it just about old data before the upgrade? The logbase had to be disabled in gdash.wikimedia.org (now using 0.9.12) for a graph with some zeros: https://gerrit.wikimedia.org/r/#/c/107367/
Nicholas Leskiw, sorry for the ignorance, what do you mean by aggregation boundary in this context? Can it be configured?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.