I am using Nginx to serve both graphite and grafana (they are all running on the same server - not my desktop). I am able to access graphite via Nginx. However, grafana cannot
Another thing to try would be to use a CORS proxy if you cannot edit the NGinx config. I used the NPM package corsproxy to get around the graphite CORS issue.
Install the corsproxy package:
mkdir graphiteProxy
cd graphiteProxy
npm install corsproxy
echo "copy the version of http_proxy corsproxy depends on into"
echo "your local node_modules"
cp -r node_modules\corsproxy\node_modules\http-proxy node_modules\http_proxy
touch app.js
app.js:
// point the grafana config.js to your local proxy: http://localhost:8081
var cors_proxy = require('corsproxy')
var http_proxy = require('http-proxy')
cors_proxy.options = {
target : "http://{{graphiteserver}}:8080"
}
http_proxy.createServer(cors_proxy).listen(8081)
run the proxy:
node app.js