Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It's seems that cubism works ,but can't fetching data from graphite! #52

Closed
sagehan opened this issue May 29, 2013 · 3 comments
Closed

Comments

@sagehan
Copy link

sagehan commented May 29, 2013

I worked hard to drive cubim in working ,but get nothing like this :

84f5a890-21a5-4a9f-ab77-f7dc08109bb6

but the native webapp of graphite works nicely:

63605aee-5c5e-420d-ae19-9c0e8a372876

I am a rookie and confused ,can anybody help me!

@sagehan
Copy link
Author

sagehan commented May 29, 2013

Here is my html source code:

<!DOCTYPE html>    <meta charset="utf-8" />    <h2><a href="http://catcap.cn"><img src="http://tp3.sinaimg.cn/2453988174/180/5632977800/0" id="logo"></a>>系统负载</h2>    <style>     @import url(//fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400,700);    @import url(./css/style.css);     </style>    <div id="body">     <div id="example1"></div>     <script type="text/javascript" src="./js/d3.v3.js"></script>    <script type="text/javascript" src="./js/cubism.v1.js"></script>    <script type="text/javascript" src="./js/highlight.min.js"></script>      <script>
var context = cubism.context()        .serverDelay(0)
    .clientDelay(0)
    .step(1e3)
    .size(960);

var graphite = context.graphite("http://192.168.170.195:8080");    var horizon = context.horizon().metric(graphite.metric).height(50);

var metrics = [
   "system.loadavg_1min",
   "carbon.agents.Router1008_catcapstudio_com-a.cpuUsage"
]

d3.select("#example1").call(function(div) {

div.append("div")
    .attr("class", "axis")
    .call(context.axis().orient("top"));

div.selectAll(".horizon")
    .data(metrics)
  .enter().append("div")
    .attr("class", "horizon")
    .call(horizon);

div.append("div")
    .attr("class", "rule")
    .call(context.rule());
});
</script>

@sagehan
Copy link
Author

sagehan commented May 30, 2013

I had figured out that there was something wrong with griphte django :

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 28, in evaluateTokens
    args = [evaluateTokens(requestContext, arg) for arg in tokens.call.args]
  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 28, in evaluateTokens
    args = [evaluateTokens(requestContext, arg) for arg in tokens.call.args]
  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 24, in evaluateTokens
    return fetchData(requestContext, tokens.pathExpression)
  File "/opt/graphite/webapp/graphite/render/datalib.py", line 224, in fetchData
    dbResults = dbFile.fetch( timestamp(startTime), timestamp(endTime) )
  File "/opt/graphite/webapp/graphite/storage.py", line 298, in fetch
    (timeInfo,values) = whisper.fetch(self.fs_path, startTime, endTime)
TypeError: 'NoneType' object is not iterable

@mbostock
Copy link
Collaborator

This doesn’t appear to be a bug in Cubism. I recommend trying Stack Overflow if you want help.

Also, if your dashboard and Graphite install are on separate servers, make sure you have Access-Control-Allow-Origin: * enabled on Graphite so that the results are accessible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants