I trying to make changes to kibana core source code and I trying to access the variables in kibana.yml file from my JS file. Example is shown as below:
let elastic_url = process.env['elasticsearch.hosts']
Would really appreciate if anyone can give some pointers.
Generally speaking, within the new plugin structure, variables from kibana.yml are accessible only on the server side by using the plugin context initializerContext.config that's passed to the server plugin constructor as the first parameter.
For example, if you look at src/plugins/data/server/plugin.ts, it receives an initializerConfig parameter. In your own server side plugin you could do initializerContext.config.get('...').
I hope this points you out in the right direction!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.