Reader small image

You're reading from  Learning Kibana 5.0

Product typeBook
Published inFeb 2017
Reading LevelBeginner
PublisherPackt
ISBN-139781786463005
Edition1st Edition
Languages
Right arrow
Author (1)
Bahaaldine Azarmi
Bahaaldine Azarmi
author image
Bahaaldine Azarmi

Bahaaldine Azarmi, Global VP Customer Engineering at Elastic, guides companies as they leverage data architecture, distributed systems, machine learning, and generative AI. He leads the customer engineering team, focusing on cloud consumption, and is passionate about sharing knowledge to build and inspire a community skilled in AI.
Read more about Bahaaldine Azarmi

Right arrow

Chapter 9.  Creating a Custom Plugin for Kibana 5.0

Earlier in this book, we looked at how to extend an existing Kibana plugin, namely, Timelion. We also tried to extend the visualization palette and add our own visualizations to Kibana dashboards.

Now, in this final chapter, we'll learn how to leverage the stack-management architecture Kibana provides to extend the existing capabilities through the creation of a new plugin.

To be a bit more specific, we will be covering the following topics in this chapter:

  • Developing a plugin and looking at how to set up the environment to develop a plugin, which is similar to what we did with Timelion, with the difference of code structure

  • Once we have our environment ready, we'll dig into the implementation of a topology explorer plugin, which will allow you to visualize your Elasticsearch cluster topology

Creating a plugin from scratch


When I say from scratch, it's not totally accurate, as we are going to use a plugin generator made by the Kibana team itself.

In this section, we'll first start to use Yeoman to generate a plugin and analyze its structure.

Yeoman - the plugin scaffolder

It's not obvious to start developing a Kibana, specifically when you don't know what the project structure looks like, what are the required dependencies, or how to build it. This is where Yeoman will you get started.

Note

Yeoman is a utility tool to scaffold new projects such as a Kibana plugin.

You can access more documentation from http://yeoman.io/ and specifically on the generator discovery section, http://yeoman.io/generators/, which allows searching for Yeoman generators:

Yeoman generator discovery

Yeoman needs to be installed using Node.js in order to be used; you just need to issue the following command:

npm install -g yo

We will also install the Kibana plugin generator, the code for which can be found at...

A plugin to render Elasticsearch topology


The plugin I propose to create in this chapter will provide a way to get a better understanding of the cluster topology and, more specifically, how the data is distributed over indices, shards, and even down to the segment.

Note

Topology will leverage an open source visualization framework. It is provided by Baidu: ECharts 3, which can be accessed at http://echarts.baidu.com. This visualization framework provides a very large palette of visualizations, and in particular one that is pretty handy to visualize data in clusters: the treemap visualization:

Treemap visualization displays data in clusters

The preceding example can be found here: http://echarts.baidu.com/demo.html#treemap-disk.

As you can see, the data is organized in the form of multi-level clusters: if you click on one of them, you will drill down to the underlying level, and so on. Each block size depends on the relative value; the following is an example of how a block is described in the...

Summary


At this point, we are pretty much done with custom plugin implementation in Kibana.

We have been through the generation of a bare Kibana plugin, and how the plugin is structured and how the environment should be prepared with regards to custom plugin implementation requirements. We have also seen how the service-side code and the front side code works together and how to build and install the plugin in a target environment.

Finally, I hope that this topology will help you to get a better idea of the distribution of the data across all the indices.

This concludes, I hope, an interesting ride through all the new and exciting Kibana 5.0 features. I hope you have enjoyed the reading and now have a good understanding of how Kibana 5.0 can serve a very large variety of use cases.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Learning Kibana 5.0
Published in: Feb 2017Publisher: PacktISBN-13: 9781786463005
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Bahaaldine Azarmi

Bahaaldine Azarmi, Global VP Customer Engineering at Elastic, guides companies as they leverage data architecture, distributed systems, machine learning, and generative AI. He leads the customer engineering team, focusing on cloud consumption, and is passionate about sharing knowledge to build and inspire a community skilled in AI.
Read more about Bahaaldine Azarmi