###Writing Kibana plugins
#####Background knowledge:
- JavaScript development (npm modules; ..)
- AngularJS (MVC Framework)
- RequireJS
#####Every plugin is a npm module, so at least need:
- package.json
- index.js
- a public folder
├── index.js
├── package.json
├── public
│ ├── kbn_plugin.html
│ ├── kbn_plugin.js
│ ├── kbn_plugin.less
│ ├── kbn_plugin_controller.js
│ ├── kbn_plugin_params.js
│ └── lib
│ └── agg_response.js
(Could also combine agg_response.js into kbn_plugin_controller.js)
- esResponse: Holds the Elasticsearch response for your visualization.
- vis: Holds information about your visualization and the settings the user chose.
Access data from metrix: $scope.vis.aggs.bySchemaName['your_metrix_name'][0];
Access data from buckets: $scope.vis.aggs.bySchemaName['your_bucket_name'][0].id;
-
Metrics aggregations(aggFilter): avg, cardinality, count, max, median, min, percentile_ranks, percentiles, std_dev, sum
-
Bucket aggregations(aggFilter): date_histogram, date_range, filters, geohash_grid, histogram, ip_range, range, significant_terms, terms
[Writing Kibana 4 Plugins] (https://www.timroes.de/2015/12/02/writing-kibana-4-plugins-basics/)
[Kibana Plugin Yeoman Generator] (https://www.npmjs.com/package/generator-kibana-plugin)
How to Build Your Own Kibana Plugins(slides)
[{{more}} Kibana4] (http://www.slideshare.net/chenryn/more-kibana4)
Data visualization with Elasticsearch aggregations and D3
[Creating Custom Kibana Visualizations: A How-To Guide] (http://logz.io/blog/kibana-visualizations/)
- csv file should be edit at least once so you can import into logstash (因windows權限問題)
- csv file 用編輯器先存成utf8再匯入logstash避免中文出現亂碼