pueteam / datasource-plugin-solr

Solr Datasource for Grafana
Apache License 2.0
22 stars 11 forks source link

Invalid characters in query #13

Open misilot opened 2 years ago

misilot commented 2 years ago

I am getting the following error when I try the URL directly from the XHR request, but the interface in grafana is returning e is undefined

Message Invalid character found in the request target [/solr/statistics/select?wt=json?fq=time:[2022-05-24T20:21:34.757Z%20TO%202022-05-24T21:21:34.757Z]&q=:&fl=time,&rows=100000&sort=time%20desc ]. The valid characters are defined in RFC 7230 and RFC 3986

If I remove the ?fq=time:[2022-05-24T20:21:34.757Z%20TO%202022-05-24T21:21:34.757Z] I don't get a 400 bad request, but actual data.

Thanks!

smyth90 commented 1 year ago

There's a bug in this codebase that produces a URI with two question marks, which is incorrect. Someone else attempted to fix it, but their syntax was off. I've submitted a new pull request with a valid fix: https://github.com/pueteam/datasource-plugin-solr/pull/16

However, this project may be abandoned. In which case, you'd have to clone this repo, compile locally, and copy the working plugin distribution folder to your Grafana instance. Since it won't be signed, you'll have to run Grafana with a configuration that whitelists unsigned plugins:

[plugins]
allow_loading_unsigned_plugins = pue-solr-datasource