Kibana Installation and Configuration

Share:

In our adventurous journey of learning data visualization and analysis, we have come across different technologies and environments. Among all, Kibana walks in with grace and style, striding with a simple and user-friendly experience, providing a visualization interface for Elasticsearch, Logstash, and Beats. Brought together, these create the powerful ELK (Elasticsearch, Logstash, and Kibana) Stack for data analysis.

In this chapter, we will focus on getting Kibana installed and properly configured, just like a director prepares a film set for a blockbuster movie.

Kibana Installation

The first act in our movie is about setting up the stage, that is, installing Kibana. Regardless of your operating system, you'll need to have Elasticsearch installed beforehand. If you haven't installed Elasticsearch, think of it as not having an actor for a movie. We surely can't proceed without our lead.

To install Kibana, follow the directions that correspond to your operating system:

For Mac OS:

brew tap elastic/tap
brew install elastic/tap/kibana-full

For Windows, download the Kibana installer from the official Elastic website. For Ubuntu, ensure that you have curl and apt-transport-https installed, then use:

curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update && sudo apt-get install kibana

Regardless of the method, our a-list actor Kibana is now ready and installed in our system.

Kibana Configuration

Now that the first act of our movie is done, it's time to proceed to Act II: The Mighty Configuration. Kibana's settings are based on the YAML format, like a script for an actor, in a file called kibana.yml.

You can find this file in the config directory inside the Kibana installation path, the precise location depends on which type of installation you have.

Let's proceed by setting some basic Kibana settings.

Server and Host

# Kibana is served by a back end server. This setting specifies the port to use.
server.port: 5601

# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
# The default is 'localhost', which usually means remote machines will not be able to connect.
# To allow connections from remote users, set this parameter to a non-loopback address.
server.host: "localhost"

In the above settings, we have set Kibana to run on port 5601 on our local system. It's like telling an actor where the stage is.

Connecting to Elasticsearch

Kibana acts as an interface for Elasticsearch, hence we need to tell Kibana where to find Elasticsearch.
Assuming Elasticsearch and Kibana are on the same computer, we use:

# The URL of the Elasticsearch instance to use for all your queries.
elasticsearch.hosts: ["http://localhost:9200"]

For more blockbuster movie-like features, you might need your Kibana and Elasticsearch on different computers. In such situations, replace localhost with the IP of the machine where Elasticsearch is installed. It's like an actor knowing which studio to report to.

Setting a default index

When working with Kibana, we’ll deal with indexes, which are like topics or themes in a movie. Kibana needs to know which is the 'default' or 'main' index is, much like identifying the lead character in our film.

# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
# dashboards. Kibana creates a new index if the index doesn’t already exist.
kibana.index: ".kibana"

With these basic configurations in place, save your kibana.yml file and close it. Kibana is now configured to meet your needs.

Starting the server

Congratulations! The shooting of our movie is now ready to commence, the script is set, and the actor knows his part. It's time to shout "Action!". To start Kibana, navigate to the bin directory inside Kibana's installation path and start the Kibana server with:

./kibana

This starts the Kibana server, and you can interact with Kibana from your web browser at http://localhost:5601. The curtains have been drawn, and it's time for Kibana to deliver its spectacular performance.

The beauty of Kibana lies in its simplicity and robustness, allowing us to conduct complex data analysis without requiring in-depth technical knowledge. In our next chapter, we will look at loading and visualizing data using Kibana, and by the time we’re done, you will be directing your own blockbuster analytics show.

0 Comment


Sign up or Log in to leave a comment


Recent job openings