grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
65.07k stars 12.14k forks source link

elasticsearch: "an error occured" popup appears if the elastic-user does not have enough permissions #95032

Open gabor opened 3 weeks ago

gabor commented 3 weeks ago

when the elastic query editor is open, the plugin tries to find out the elastic-database-version using https://github.com/grafana/grafana/blob/388023a1727609c8779d35dcd819bb59693c7252/public/app/plugins/datasource/elasticsearch/datasource.ts#L1116 .

if it fails, nothing bad happens, things continue correctly. the problem is, if it fails, you get an error-popup saying "an error occured within the plugin". would be great not to have this popup.

(i assume the popup is opened automatically by some generic grafana code when a resource-call fails).

to reproduce:

kevinwcyu commented 2 weeks ago

@gabor, do you have instructions for create an elastic user that has no permission to fetch the / path (the root, where the elastic-database-version is)? I'm using make devenv sources=elastic, but I don't actually know how to create a user with the restricted permissions.