obfuscurity / tasseo

Live dashboard for Graphite
Other
1.53k stars 127 forks source link

Access-Control-Allow-Origin #62

Closed vvgomes closed 11 years ago

vvgomes commented 11 years ago

Hi All,

I'm trying to run Tasseo for the first time. I have a Graphite instance running at localhost:8080 and the Tasseo server at localhost:5000. I've exported GRAPHITE_URL=http://localhost:8080 and created an example dashboard in Tasseo. No auth is required to access my Graphite. However, I'm facing the following Javascript error:

XMLHttpRequest cannot load http://localhost:8080/render/?target=keepLastValue(system.loadavg_15min)&from=-5minutes&format=json. 
Origin http://localhost:5000 is not allowed by Access-Control-Allow-Origin.

My dashboard file looks like this:

var metrics =
[
  {
    "alias": "system.loadavg_15min",
    "target": "system.loadavg_15min",
    "warning": 100,
    "critical": 500
  }
];

I'm able to retrieve successful responses with data from Graphite when I point my browser to the Graphite query url.

I read your README several time to make sure I followed every required steps. Anyway, is there anything I might be missing? Is there anything I have to change in the Tasseo code (I wouldn't expect that)?

Thanks

obfuscurity commented 11 years ago

It's right there in the README. :smile_cat:

https://github.com/obfuscurity/tasseo#graphite-server-configuration

vvgomes commented 11 years ago

I forgot to mention that I have that configured already and the problem is still the same :(

obfuscurity commented 11 years ago

Regardless, that's where your problem lies. Make sure your origin actually matches with what the server is configured to allow.