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

cannot got graph connect to local graphite #8

Closed
huhongbo opened this issue Apr 17, 2012 · 3 comments
Closed

cannot got graph connect to local graphite #8

huhongbo opened this issue Apr 17, 2012 · 3 comments

Comments

@huhongbo
Copy link

when i use curl to http://localhost/render?from=-10minutes&until=now&width=400&height=250&target=collectd.localhost.memory.memory-used&target=collectd.localhost.memory.memory-free&format=json, I can got the right json format output from graphite

I modify the dashboard-autodiscover.html to following, "test" is my dashboard name
g.discover('http://localhost', 'test', function(i, url){ return "#dashboard"; }, function(description){
g.build(description);
console.log(description);

but I got nothing

@jondot
Copy link
Owner

jondot commented Apr 17, 2012

Hi,
You need to start your browser with cross-domain enabled.
See here: https://github.com/jondot/graphene/blob/master/run_browser.sh
Since the purpose is to run a dashboard, your browser would probably just run one tab and not be used for regular browsing so that's OK.

There is a pending pull request which was contributed, allowing cross-domain via JSONP that I plan to merge, which won't require this.

@sigil66
Copy link

sigil66 commented Apr 18, 2012

Alternatively you can deploy your dashboard as a chrome extension which allows you to define whitelisted URLs for cross domain requests. Works quite nicely for me.

Another option is to add the proper CORS headers to your requests served by Apache or Nginx or whatever web server you have in front of your graphite install.

@huhongbo
Copy link
Author

I've merge the pending pull request , and it works

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

3 participants