perSecond function returns an exception

Asked by Maziyar Mirabedini

Trying out perSecond(metricName) returns the following exception:

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/opt/graphite/webapp/graphite/render/views.py", line 104, in renderView
    seriesList = evaluateTarget(requestContext, target)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 10, in evaluateTarget
    result = evaluateTokens(requestContext, tokens)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 21, in evaluateTokens
    return evaluateTokens(requestContext, tokens.expression)
  File "/opt/graphite/webapp/graphite/render/evaluator.py", line 27, in evaluateTokens
    func = SeriesFunctions[tokens.call.func]
KeyError: u'perSecond'

I tried this with wildcard on multiple server and single metric and returns same result.

We're using Graphite 0.9.10.

any help would be much appreciated!

Question information

Language:
English Edit question
Status:
Expired
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Maziyar Mirabedini (maziyar-mirabedini) said :
#1

I just installed Graphite 0.9.9 on another machine and tried out perSecond function and got the same result.

Here's the function:
https://graphite.readthedocs.org/en/latest/functions.html#graphite.render.functions.perSecond

It seems like other people are using the function.. am I missing something?

Here's example of how I'm using it:

perSecond(DC.TestHBase.testserver.hbase.regionserver.readRequestsCount)

Revision history for this message
Maziyar Mirabedini (maziyar-mirabedini) said :
#2

Okay. My bad... I checked the 0.9.9 documentation and perSecond function doesn't even exist there.

Its interesting that we get the exact same exception in both versions...so I'm guessing that perSecond was missed from the stable release of 0.9.10???

So I downloaded the latest code from github, installed ceres and byparsing and installed it. well.. perSecond works perfectly there..

I'm not marking this problem as resolved because I think the documentation should be updated to say that the function is not available in 0.9.10...

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.