Adding custom config in kibana.yml

Hi Team,
I am trying to add a custom config in kibana.yml for my custom plugin , but kibana fails and says unknown config key on load of the plugin .

In plugin ,can kibana take my config schema from config object of Kibana.Plugin({config:}), as it is not working but i dont want to change the schema.js of kibana .

Please suggest .

currently in my plugin index.js , i am configuring the injectedVars like below and there it fails :

return new kibana.Plugin({
require: ['kibana'],
name: 'customplugin',

uiExports: {
  app: {
    title: 'customplugin',
    description: 'customplugin for Kibana',
    main: 'plugins/custom/custom',
    injectVars: function (server, options) {
      var config = server.config();
      return {
        kbnIndex: config.get('kibana.index'),
        esApiVersion: config.get('elasticsearch.apiVersion'),
        custom_config: config.get('customplugin.url')
      };
    }
  }, 

config: function (Joi) {
return Joi.object({
enabled: Joi.boolean().default(true),

    url: Joi.string().uri({ scheme: ['http', 'https'] })['default']('https://localhost:8443')
  })['default']();
},

In your plugin's package.json, is name set to customplugin?

Yes the name is set to customplugin.

But not in package.json , name is matching only in index.js

Does using the name set in the package.json work? Looking at the code I believe that's where it's being pulled from.

Hi @jbudz , ya its working but little bit wierd , what is the significance of keeping name inside the kibana.Plugin then ?

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