Plugin OwnHome on Kibana 7.5

Hello guys !

I'm working on the migration of OwnHome on Kibana 7.5.0 and I've a little issue.

OwnHome is similar to the x-pack spaces mecanism, to isolate Kibana index in different spaces, the plugin set up a proxy between Kibana and Elasticsearch to catch requests in order to change the kibana index name.

But Kibana 7.5 wait the Elasticsearch connection before to init plugins. Or in this case the proxy server is only available when the plugin OwnHome is initialized. So Kibana never start and wait the elasticsearch connection :frowning:

So is it possible to force the init of some plugins before elasticsearch ?

For more information on this plugin, you can take a look here :

Hi pchakour,

Kibana's plugin system (located in src/core/) will attempt to connect to Elasticsearch to perform any saved objects migrations that might be required. We do this before we start any plugins so that these are ready for the plugins to use. There is no way to force a plugin to run before this step.

One way to get around this limitation is for OwnHome to start the proxy in an independent Node.js process. Instead of reading the config values off of Kibana's server object you would then need to read the config values directly from the kibana.yml file. The UI part of the OwnHome plugin can then continue to live inside Kibana as a plugin.

Looking through OwnHome source code, it's not clear to me how OwnHome would behave when there's Saved Object migrations defined by some of Kibana's plugins. Kibana will attempt to migrate all the saved objects in the .kibana index. But if OwnHome uses multiple indexes that Kibana is unaware of, Kibana wouldn't know or attempt to migrate these. This will lead to unexpected behaviour when upgrading to a newer version when using OwnHome.

Hey, thank you for your answer :slight_smile:

Ok, I will try to make a work around...
Yes, you're right, there is no migration of .kibana index with OwnHome so I do it manually when necessary.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.