elasticsearch-head icon indicating copy to clipboard operation
elasticsearch-head copied to clipboard

xpack basic leads to misleading message "cluster health: not connected"

Open chx opened this issue 5 years ago • 2 comments

If you are doing xpack.license.self_generated.type basic then, while the browser and the Any Request tab works, the cluster health will not and neither will structured query due to xpack basic limiting some query. I understand of course the problems with _stats returning a 403 but since _nodes and state does come back with useful data maybe some other message could be displayed which shows that connection is indeed successful but the cluster health is not available ? (Due to security.) This caused me endless headaches because I didn't even try the browser tab when Overview and Indices didn't work and I presumed it's my ineptness with docker compose that causes things not to work -- when they actually work.

chx avatar Feb 19 '20 02:02 chx

Just found a way to get permission (without superuser) to read cluster info.

Try to create a new role monitor cluster privileges assigned to the role. Users with this role should be able to access node info, node and cluster stats. Reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html

philipskokoh avatar May 19 '20 07:05 philipskokoh

I made this work by forking an existing proxy and adding the CORS logic directly to the proxy.

https://github.com/aman-thakral/aws-es-proxy-py

To create a local proxy using the "default" aws profile store in ~/.aws/credentials and enable CORS use the following:

./aws_es_proxy_py -r us-east-1 -p 9200 --enable-cors --profile default -e <es url>

aman-thakral avatar Oct 30 '20 05:10 aman-thakral