grafana-gnocchi-datasource
grafana-gnocchi-datasource copied to clipboard
Problem when using keystone auth mode and server(proxy) access mode
When using token auth mode and server access mode, test operation will get gnocchi resources through grafana server normally. However, if using keystone auth mode, test operation will get token through proxy but get gnocchi resource directly. For example (in one test operation): http://<grafana_ip>:<grafana_port>/api/datasources/proxy/5/v3/auth/tokens http://<gnocchi_ip>:8041/v1/resource
btw, keystone's ip and gnocchi's ip are the same
@rocasyeh,
I'm seeing the same thing as well. When I do a tcpdump of all traffic from the grafana host to the controller, home of keystone and gnocchi, i only see a successful authentication reply with a token and endpoint catalog. I never see an attempt to the gnocchi api on port 8041. In my case, Cross-Origin Resource Sharing is configured and tested even though is likely not an issue in server access mode.
@sileht Mr. Abaakouk, any thoughts?
I can confirm the problem, as well. In proxy mode, parsing the service catalog is of no use as you can only connect to the configured endpoint, anyways. So I replaced the parsing code with a simple:
_this.url = _this.keystone_endpoint;
This makes it work ok for me in proxy mode. It won't work in direct mode, though.