elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.73k stars 8.14k forks source link

[maps] unable to get index settings from remote index #184936

Open nreese opened 3 months ago

nreese commented 3 months ago

Steps to view problem

  1. Start remote elasticsearch by running: yarn es snapshot -E transport.port=9500 -E http.port=9201 -E path.data=../remote1
  2. Install sample data to remote cluster
    1. Add elasticsearch.hosts: ["http://localhost:9201"] to kibana.dev.yml. Note create config/kibana.dev.yml if one does not exist. kibana.dev.yml is not managed by git so it has to be created the first time you add values.
    2. run yarn start to start kibana process
    3. install sample web logs data set on home page
    4. stop kibana process
    5. remove elasticsearch.hosts from kibana.dev.yml
  3. Start local elasticsearch by running: yarn es snapshot -E path.data=../local1
  4. Start kibana
  5. Add remote cluster under "Stack management -> Remote clusters"
    1. Set Name to "remote1"
    2. Set Seed nodes to "localhost:9500"
    3. Enable Skip if unavailable
  6. Create data view.
    1. Set Index pattern to remote1:kibana_sample_data_logs
  7. create map, add documents layer from remote1:kibana_sample_data_logs data view. Notice warning about index settings read failure
  8. Run GET /remote1:kibana_sample_data_logs/_settings in console and get same error.

Elasticsearch get index settings API does not support remote index. We will need to investigate how to get max_result_window from remote index.

elasticmachine commented 3 months ago

Pinging @elastic/kibana-presentation (Team:Presentation)

nreese commented 3 months ago

Feed back from Elasticsearch team

"The reason is quite simple: ES is not a proxy. These requests can rather easily be sent to remote clusters directly. Otherwise we need to have cross cluster support for all our API. We document which API support this explicitly"

Use the resolve index API to get cluster connection information and and then call get index settings directly for the remote cluster.