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

Datasource not working when Grafana is configured with root_url #9

Open
fetzerch opened this issue Jan 17, 2017 · 0 comments
Open

Datasource not working when Grafana is configured with root_url #9

fetzerch opened this issue Jan 17, 2017 · 0 comments

Comments

@fetzerch
Copy link

The datasource doesn't show any values if Grafana is configured to run on a different root_url.

The error log shows that the directory from the root_url setting is not passed to the request:

GET http://server/api/datasources/proxy/7/v1/tasks/8232611d-27f5-4716-9a83-28ae867ffdc1/watch 404 (Not Found)

While the correct URL would be:

http://server/grafana/api/datasources/proxy/7/v1/tasks/8232611d-27f5-4716-9a83-28ae867ffdc1/watch

The issue seems to be in this function: https://github.com/raintank/snap-app/blob/master/src/datasource/stream_handler.js#L31 (this.ds.url does not contain the configured subdirectory).

In Grafana core this is usually implemented by importing app/core/config and prepending config.appSubUrl to the URLs. I'm not sure if that's a working / acceptable solution also for a plugin.

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

1 participant