Grafana - Elasticsearch error: no permissions for xxx

Hello, I’m trying to add a Elasticsearch datasource into my grafana but when I’m testing the datasource I have this error:
Elasticsearch error: no permissions for [indices:admin/mappings/get] and User [name=$USER, backend_roles=[], requestedTenant=null]
When I’m using a admin user there is no problem so it’s a permission issue but I don’t know what parmission I’m supposed to give to my user.
I have tried:
• On index: *
◦ read
◦ view_index_metadata
◦ view_metadata
◦ indices:admin/mapping/get
Do anyone already encounter this error ?

What’s the role mapping in Elasticsearch for the user admin ?

The admin user that I used has the full_access role so it’s not helping to figure out what is working…

Can you try adding all privileges first to see if it works, and then take off one at a time and test? Either that, of increase logging level at Elasticsearch, Grafana, or both should help I would think.

Mmh… I will try with the full list of permissions, I’ll let you know thank you

Ok so I find the good permissions in facts, I just need read and indices:admin/mappings/get. Everything worked well yesterday… BUT… today when I’m testing my datasource I have the following error:
Elasticsearch error: Authentication to data source failed
This is weird cause even with the admin user I have this message.
And when I’m trying to use thoses users to login using API it works.

And of course grafana logs don’t tell me anything except “failed”

My bad it’s okay, I wasn’t using my team ES endpoint so the other team blocked me :eyes:

On a related note, did you explore if there any options to bump up the logging in Grafana to get more information on errors?

https://grafana.com/docs/grafana/latest/packages_api/data/loglevel/