opendistro-for-elasticsearch / kibana-reports

Kibana Reports
https://opendistro.github.io/
39 stars 31 forks source link

Option to define a kibana index for report source #315

Closed jlumley closed 3 years ago

jlumley commented 3 years ago

The kibana.yml config file allows users to change the index where Kibana saves all the visualizations and dashboards but reportSource.ts hard-codes the source index to ".kibana".

I can make the changes, I just wanted to get some feedback before starting any work.

Also new to typescript so any help and insight is welcome.

Thanks!

zhongnansu commented 3 years ago

Hi, thank you for your feedback! These are my thoughts

  1. I am curious about the usecase of choosing customized kibana index, other than .kibana
  2. Will it work with Open distro security plugin for multi-tenancy? https://opendistro.github.io/for-elasticsearch-docs/docs/security/access-control/multi-tenancy/
  3. Also, how do you plan to read from kibana.yml? Is there something like
    const config = core.http.getServerInfo();
    const serverBasePath = core.http.basePath.serverBasePath; 
ylasri commented 3 years ago

Yes, there is an option to access kibana.index from kibana.yml but marked as a legacy, means that may be changed in the future Have a look here : https://github.com/elastic/kibana/blob/master/x-pack/plugins/event_log/server/plugin.ts#L69-L70 Or have a look at this PR #314

jlumley commented 3 years ago

@zhongnansu

  1. I inherited an Elasticsearch instance running an older version of vanilla Elasticsearch, we supported multi-tenancy by allowing multiple instances of Kibana to read from one elasticsearch instance but write to their own kibana index. Does the multi-tenancy plugin restrict me to using only a single Kibana instance?
  2. Does reporting support multi-tenancy today given that only the global tenant uses the .kibana index and every other tenant uses .kibana_<hash>_<tenant_name>?

@synapticiel does config.kibana_index match the kibana index being used for the current tenant or will it always be the global kibana index?

Thanks again for your time.

ylasri commented 3 years ago

Hi @jlumley It will match the tenant index

jlumley commented 3 years ago

Great! Thanks @synapticiel