Create a new plugin for Kibana


#1

Hi,

I am trying to create avery basic plugin for kibana, I check the offcial documentation ... but I think its outdated :

https://www.elastic.co/guide/en/kibana/current/development-plugin-resources.html

it says that we can use the plugin generator based upon yeo template ... didn't work at all.

so I move to the second option, I tried to use the instructions available here :

And so far I am stuck with this error when I bootup using

npm start

kibana-plugin-apr@0.0.0 start /home/user/apps/kibanaPluginXYZ
plugin-helpers start

watching for changes (462 files)
log [17:15:37.284] [info][listening] basePath Proxy running at http://localhost:5601/xun
optmzr log [17:15:45.776] [info][status][ui settings] Status changed from uninitialized to disabled - uiSettings.enabled config is set to false
server log [17:15:55.525] [info][optimize] Waiting for optimizer completion
optmzr log [17:15:56.344] [info][optimize] Lazy optimization of bundles for kibana-plugin-xyz, kibana, stateSessionStorageRedirect, timelion, sense-tests and status_page ready
optmzr log [17:15:56.356] [info][optimize] Lazy optimization started
optmzr log [17:15:56.756] [info] Plugin initialization disabled.
server log [17:15:56.793] [info][status][plugin:kibana@7.0.0-alpha1] Status changed from uninitialized to green - Ready
server log [17:15:56.976] [info][status][plugin:elasticsearch@7.0.0-alpha1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
server log [17:15:57.035] [info][status][plugin:kibana-plugin-apr@0.0.0] Status changed from uninitialized to green - Ready
server log [17:15:57.056] [info][status][plugin:console@7.0.0-alpha1] Status changed from uninitialized to green - Ready
server log [17:15:57.083] [info][status][plugin:metrics@7.0.0-alpha1] Status changed from uninitialized to green - Ready
server log [17:15:58.473] [info][status][plugin:timelion@7.0.0-alpha1] Status changed from uninitialized to green - Ready
server log [17:15:58.489] [info][listening] Server running at http://localhost:5603
server log [17:15:58.491] [info][status][ui settings] Status changed from uninitialized to yellow - Elasticsearch plugin is yellow
server log [17:16:05.278] [info][status][plugin:elasticsearch@7.0.0-alpha1] Status changed from yellow to yellow - No existing Kibana index found
server log [17:16:19.549] [info][status][plugin:elasticsearch@7.0.0-alpha1] Status changed from yellow to green - Kibana index ready
server log [17:16:19.552] [info][status][ui settings] Status changed from yellow to green - Ready
optmzr log [17:17:19.907] [fatal][optimize] Lazy optimization failed in 83.52 secondsError: Optimizations failure.

ERROR in ./optimize/bundles/kibana.entry.js
Module not found: Error: Cannot resolve module 'plugins/kibanaPluginXYZ/hack' in /home/user/apps/kibana/optimize/bundles
 @ ./optimize/bundles/kibana.entry.js 59:0-39

ERROR in ./optimize/bundles/sense-tests.entry.js
Module not found: Error: Cannot resolve module 'plugins/kibanaPluginXYZ/hack' in /home/user/apps/kibana/optimize/bundles
 @ ./optimize/bundles/sense-tests.entry.js 34:0-39

ERROR in ./optimize/bundles/stateSessionStorageRedirect.entry.js
Module not found: Error: Cannot resolve module 'plugins/kibanaPluginXYZ/hack' in /home/user/apps/kibana/optimize/bundles
 @ ./optimize/bundles/stateSessionStorageRedirect.entry.js 34:0-39

#2

I think I found the issue with the optimizer error below, related to the naming of the folder of the plugin : the folder name of the plugin should not contains any upper case letters ... (a bug ?)

now I am facing another issue, when trying to acces the kibana portal I get :

{"statusCode":404,"error":"Not Found","message":"Not Found"}

kibanaplgxyz@0.0.0 start /home/user/apps/kibanaplgxyz
plugin-helpers start

watching for changes (462 files)
log [17:52:10.498] [info][listening] basePath Proxy running at http://localhost:5601/jxn
optmzr log [17:52:17.909] [info][status][ui settings] Status changed from uninitialized to disabled - uiSettings.enabled config is set to false
server log [17:52:25.691] [info][optimize] Waiting for optimizer completion
optmzr log [17:52:26.323] [info][optimize] Lazy optimization of bundles for kibanaplgxyz, kibana, stateSessionStorageRedirect, timelion, sense-tests and status_page ready
optmzr log [17:52:26.337] [info][optimize] Lazy optimization started
optmzr log [17:52:26.367] [info] Plugin initialization disabled.
server log [17:52:26.401] [info][status][plugin:kibana@7.0.0-alpha1] Status changed from uninitialized to green - Ready
server log [17:52:26.547] [info][status][plugin:elasticsearch@7.0.0-alpha1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
server log [17:52:26.582] [info][status][plugin:kibanaplgapr@0.0.0] Status changed from uninitialized to green - Ready
server log [17:52:26.607] [info][status][plugin:console@7.0.0-alpha1] Status changed from uninitialized to green - Ready
server log [17:52:26.681] [info][status][plugin:metrics@7.0.0-alpha1] Status changed from uninitialized to green - Ready
server log [17:52:26.685] [info][status][plugin:elasticsearch@7.0.0-alpha1] Status changed from yellow to green - Kibana index ready
server log [17:52:28.093] [info][status][plugin:timelion@7.0.0-alpha1] Status changed from uninitialized to green - Ready
server log [17:52:28.108] [info][listening] Server running at http://localhost:5603
server log [17:52:28.111] [info][status][ui settings] Status changed from uninitialized to green - Ready
optmzr log [17:53:24.567] [info][optimize] Lazy optimization success in 57.91 seconds


(system) #3

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