1
我們如何獲得石墨中的一系列常數值。我已經檢查了功能constantLine(x)
,但是它在「圖形」上繪製了一條常量線。不過,我需要json格式的值。以json格式返回石墨中的恆定值
函數Identity(t)
,返回x(t) = t;
我們需要的是y(t) = constant
。
目前,我認爲我們需要在石墨DB中注入數據點。沒有它,我們可以做到嗎?
[graphite web uri]/render?target=FUNC(x)&format=json.
*編輯: 我曾嘗試constantLine(x)函數 我得到: 回溯(最近通話最後一個): *
File "/usr/lib/python2.7/dist-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'contantLine'
*
嘿我有一個錯誤,當我使用相同的,你使用的石墨版本? –
0.9.10。我編輯了答案,包括解決方法。 – erbdex
嗨,有一個函數閾值(20.1,「你好」,顏色),這解決了這個問題,可悲的是,這再次與&format = json不起作用;檢查functions.py,其相同.. –