Learn how to install Logstash and Kibana in a system running the Windows operating system.
- [Narrator] Installing and starting Logstash and Kibana. In this video, we are going to take a look at the Prerequisites for installing Logstash and Kibana followed by the installation procedure and at the end, we will test the installation for both Logstash and Kibana. Logstash and Kibana is supported in multiple operating systems like elastic search, but in this video, I will demonstrate you on how to install both Logstash and Kibana in a system running in Windows operating system.
The two major prerequisites are to have the system with at least two GB RAM and we need to have the latest version of Oracle JDK installed in the system. The installation package for Logstash and Kibana can be downloaded from the link provided in the presentation. Once you launch the link, you can see the download link for the latest version of Logstash, installation package. Now, let's launch the link provided in the presentation. Over here, you can see the latest of Logstash installation file which is version 5.1.2; if you want to download the previous release of the installation package, you can click the previous releases link over here.
You can also find the basic prerequisites required for the installation in which it's mentioned to install Logstash 5.x.; we need to have Java eight installed. In this system, I have already got the latest of Java installed. We can now download the file as a ZIP file. For this demo, we will be installing the previous version which will be 5.1.1 and I have already downloaded and unzipped the installation file. Similarly, let's get the installation file for Kibana downloaded.
You can see the latest version of the installation package available which is 5.1.2; As mentioned before, you can get the installation files for the previous releases from the link over here. We have a system running in Windows operating system, so let's download this file. Similar to the Logstash installation, for this demo, we will be installing the previous release of Kibana which will be 5.1.1; unfortunately, the option to run Logstash and Kibana as a service isn't available by default, in the installation package, so in order to run the Logstash and Kibana instance as a Windows service, we need to have a software named nssm which stands for Non-Sucking Service Manager installed in our system.
You can download the latest version of nssm from this link over here. Now, we can see the unzipped folders of the installation package of Kibana, Logstash and nssm. Next, depending upon the operating system, (mumbles) us to the appropriate folder and use the nssm application in it. We are running a system of 64 bit and hence we will use this application over here.
Before we start with the installation, let's define the Logstash PipeLine configuration. The config file is nothing, but the file in which the details of the input and output stages are specified for the PipeLine to collect and pass the data. In this installation demo, we can collect the logs from a file and transfer it to another file location. We will see in detail about the construction of Logstash configuration file in section three which is dedicated for Logstash. Now, let's create the configuration file.
(mumbles) us to the bin folder of Logstash and I have already created an empty file named LogstashPipeLine.conf; let's define the input filter now and for the input, we will use the file in the folder downloads, ELK, Input, logstash-Input.log; inside the input filter, let's define it as a file filter and the path parameter should be mentioned.
Please make sure that it is enclosed in the double quotes. Next, we will define the start position which will be beginning. We will also define the output filter and the filter tab will be file and path will be downloads, ELK, output, Logstash-Output.log; Now, let's test if the configuration file we created is valid. To do it, (mumbles) to the bin part of Logstash installation package and let's test it using the command config.test_n_exit command; you can see that the configuration file is okay, but we have and gather now with the log folder configuration.
Let us fix it by adding a line in the setup.bat file in the Logstash bin folder. After adding it, let's now rerun the command again. We can see that the validation of the config file is okay and we don't have any errors and (mumbles) us to the nssm application folder.
Next, we will be executing the nssm application. To do so, enter nssm, install and the argument should be the name of the service which will be Logstash.
Once done, press Enter and you can see that nssm application has been launched. In the application path parameter, provide the path of the Logstash BAT file. The startup directory is automatically set. In the arguments tab, we need to provide the part of the config file. Now, let's create the service by clicking the install service button over here. We have now created the service and let's check it in the Windows service list and get the service started.
Once started, let us load some data into the input file. Let's enter Hello all in the input and then, press Enter. Now, let us check the output file. In here, you can see the output over here with the date timestamp, so we have successfully installed and created the data pipeline. Let's recheck it again by providing another input and in; let's recheck it by providing another input. Let us type Welcome to getting started with Elastic stack.
Now, let's check the output file and yes, we have got the output over here, as well. Now, let's move onto the installation process for Kibana; the installation tips for Kibana is very much similar to what we followed for Logstash installation.
Let's launch nssm and the service name will be Kibana. Press Enter and the nssm application is launched and in the application path, we need to provide the path of the Kibana BAT file. The startup directories automatically populated and we don't have to pass any arguments in the argument tab. Now, let's click install service to create the service. Let's get the service started.
With everything done, now, let's just the installation of Kibana by hitting the local host on the port 5601 which is the default port in which Kibana will be installed.
But, before hitting, make sure the Elastic search instance is running. We can see that Kibana has been launched successfully now. Now, let's see what happens when the Elastic search instance isn't running. We can see that the status is red and Kibana is not able to connect to the Elastic search instance.
Now, let's quickly summarize the things we have learned in this section. First, we had a look at all the members of the Elastic Family and then, we had a look why data analytics is so important for a company's success. Next, we installed Elastic search, Logstash and Kibana in a system running in Windows operating system. In the next section, we will have a look at Elastic search; a full-text server and data analytic engine.
This course was created and produced by Packt Publishing. We are honored to host this training in our library.
- Elasticsearch concepts
- Working with Logstach and Kibana
- Elasticsearch Query DSL
- Aggregation and analyzers
- Scripting in Elasticsearch
- Using plugins and APIs
- Building an interface with dashboards
- Filtering and processing input
- Loading data to Elasticsearch