template-kibana-plugin v8.0.0
template-kibana-plugin
This project is an sao.js template for bootstrapping a Kibana Plugin. It creates a basic hello world Kibana plugin with all the elements in place so you can easily get started with creating your first Kibana plugin.
Compatibility
| Generator Version | Min Kibana Version | Max Kibana Version |
|---|---|---|
| ^8.0.0 | 7.0.0 | master |
| ^7.0.1 | 5.5.0 | 6.x |
| ^6.2.2 | 5.0.0 | 5.4.x |
Getting Started
Setup your Kibana development enviroment
You can find instructions on the Kibana development documentation
Double check that your Node.js version matches Kibana's .node-version file
node --versionHINT: If you install nvm and avn then you can create your own .node-version file and avn will switch to it automatically!
Create a directory for your plugin that is right next to your Kibana directory.
The Kibana directory must be named kibana, and your plugin directory must be a sibling directory
ls ~/wherever/you/store/your/code
kibana # <- where you store the Kibana development environment
my-new-plugin # <- your plugin directoryInstall SAO
npm install -g saoRun the generator
cd my-new-plugin
sao kibana-pluginHINT: If you need to use a version other than the latest, you can specify it when you run the template:
# SAO will install template-kibana-plugin@7.2.4
sao kibana-plugin@7.2.4Optional Get the URL for your Elasticsearch installation
Elasticsearch is available at http://localhost:9200, unless you explicitly changed it in the Elasticsearch config.
Start Kibana in development mode with your new plugin included
npm startHINT: If your Elasticsearch instance is running on another port, you can pass it in here.
npm start -- --elasticsearch.url 'http://localhost:9200'
# passing the elasticsearch.url here is to demonstrate how arguments can
# be passed to kibana with `npm start` but is not actually necessary if
# you are running elasticsearch locallyOpen your Kibana instance
Visit http://localhost:5601 with your web browser of choice.
Development Tasks
npm startStart kibana and have it include this plugin
npm start -- --config kibana.ymlYou can pass any argument that you would normally send to
bin/kibanaby putting them after--when runningnpm startnpm run buildBuild a distributable archive
npm run test:browserRun the browser tests in a real web browser
npm run test:serverRun the server tests using mocha
For more information about any of these commands run npm run ${task} -- --help.