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

dashboard-autodiscover example doesn't draw graphs #26

Open
kjoconnor opened this issue Sep 11, 2012 · 7 comments
Open

dashboard-autodiscover example doesn't draw graphs #26

kjoconnor opened this issue Sep 11, 2012 · 7 comments

Comments

@kjoconnor
Copy link

I have the autodiscover example running, it seems to grab the data sources as it draws the correct number of SVG objects in the window and I can see it polling in the Javascript console, but the graphs themselves never show up.

Blank graphs

I get this in the console as well but not sure if this is related:

jquery-1.7.1.min.js:4 Resource interpreted as Script but transferred with MIME type text/json: "http://<hostname>:8000/render?width=500&from=-2hours&until=now&height=400&target=*.stat.requests&uniq=0.30485176341608167&title=*.stat.requests&format=json&jsonp=jQuery171029370606574229896_1347397300623&_=1347397500894".

@jondot
Copy link
Owner

jondot commented Feb 18, 2013

Hey @kjoconnor my apologies, I'm surprised at myself - I can't understand how I missed your issue!
Is this still relevant? can I assist in any way? - please let me know

@1tylermitchell
Copy link

hi @jondot I'm having similar challenges, looks like it accesses the dashboard json fine, but doesn't show anything in console or in graphs. My question is whether I can just change the stock autodiscover example to point to the right host and dashboard name and expect it to work or not. Is there more to it than that?

...
g.discover('http://localhost:8080', 'cpu_usage', function(i, url){ return "#dashboard"; }, function(description){
...

Manually calling the same url that graphene tries, seems to work fine:
This URL is called:
http://localhost:8080/dashboard/load/cpu_usage
Which returns:
{"state": {"name": "cpu_usage", "defaultGraphParams": {"width": 400, "from": "-3minutes", "until": "now", "height": 250}, "refreshConfig": {"interval": 60000, "enabled": false}, "graphs": [["target=carbon.agents.mbpro_local-a.cpuUsage", {"target": ["carbon.agents.mbpro_local-a.cpuUsage"]}, "/render?width=400&from=-3minutes&until=now&height=250&target=carbon.agents.mbpro_local-a.cpuUsage&_uniq=0.8438220729584862&title=carbon.agents.mbpro_local-a.cpuUsage"]], "timeConfig": {"startDate": "2013-07-19T10:34:44", "relativeStartUnits": "minutes", "endDate": "2013-07-19T10:34:44", "relativeStartQuantity": "3", "relativeUntilQuantity": "", "startTime": "9:00 AM", "endTime": "5:00 PM", "type": "relative", "relativeUntilUnits": "now"}, "graphSize": {"width": 400, "height": 250}}}

Should that work in Graphene?
Thanks for any tips.

@ersiko
Copy link

ersiko commented Oct 23, 2013

Same problem here. I can see in the apache logs a hit to the graphite dashboard returning a 200, but graphene shows nothing, just the background "diagmonds".

Is the problem in graphene or is it in the example?

@origamislayer
Copy link

I was able to make it work by proxying the requests to Graphite. Looks like a XSS security issue.

@guizello
Copy link

Hello, same problem for me. No datas about Graphite shows by "dashboard-autodiscover.html". Could you help ?
Thank you !

@riteshn-niara
Copy link

Adding on to it. It does not work for me too.

@Tonacatecuhtli
Copy link

Hi, me neither...
Ok the solution of "origamislayer" works.

Here is how I did it:

go to your apache2 graphite.conf file.
Add following line in your Virualhost Block

Header set Access-Control-Allow-Origin “*”

If you want to know more about what happens, here are my references:
1:
http://harthur.wordpress.com/2009/10/15/configure-apache-to-accept-cross-site-xmlhttprequests-on-ubuntu/
2:
http://enable-cors.org/server_apache.html

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

8 participants