Logo
  • Products
    • SecOps Studio
  • Solutions
    • Pega Stack Shifter
  • Services
    • Pega Enablement
    • Pega Modernization
  • About
  • Contact
  • Blog
Code Vault

ELK Monitoring – Part 3 – Setup Kibana

December 10, 2024 Code Vault Curators

In this blog article, we will set up and run Kibana in our local machine. We will also use REST APIs from elastic to create indexes and documents manually using DSL query.

For a better understanding, it is recommended to go through the blog articles on ELK topic in order from 1-6

https://myknowtech.com/tag/elk

– Open source visualization tool on elastic data

– It uses the REST API provided by elasticsearch and queries the data.

– It ships with a nice user interface to create visualization and dashboard on the elasticsearch data.

How to setup Kibana in Windows?

Step 1: Download the Kibana binaries

https://www.elastic.co/downloads/kibana

Step 2: Unzip and install the binaries in local machine.

Step 3: Setup some important configurations

In the config folder, you will find the kibana.yml file.

You can use your favorite editor to edit the file

a) Server configurations

By default, Kibana is reachable through localhost on port – 5601

b) Elastic server configurations

You can include the list of elasticsearch hosts in array format.

c) Other configurations – security, log, timeout settings.

Note: The comment description in the yml file is highly enough to know the usage of each field. Also if you host everything in your local machine, then no need to worry about any. The default configurations always apply to localhost server configuration.

Save the file after your configurations.

Step 4: Start the Kibana server

The Windows batch file to start the Kibana server stays in bin folder.

Open the Windows PowerShell and switch to Kibana home directory.

Now execute the below command – .binkibana.bat

You should see the running log message.

Step 5: Verify the Kibana server status

Click on http://localhost:5601

There you go, you have successfully hosted your own Kibana instance

How to setup Index pattern in Kibana?

Step 1: Click on the Management tab in the left navigation panel

Step 2: Create Index pattern.

You will see a message like there is no Index data in the elastic search. Of course, yes! I just configured it hours before.

Let’s put out some data into elastic server.

How to create Index and documents in elastic server from Kibana?

Step 1: Click on the dev tools in the left navigation panel.

There you will get a console, from where you can execute API calls to elasticsearch server to create Index or documents, search documents etc.

Going forward, we will see a list of queries that server different purpose

Step 2: Execute create Index query

First, let’s check the existing Indices in the elasticserver

GET /_cat/indices

You see only some default Indices that start with a dot.

Now, let’s create a new Index

PUT /firstindex

Note: make sure you use lower-case letters

Successfully created. Now, again use GET /_cat/indices to get the list of indices in elastic server.

In the elastic server console, you will see corresponding log entry for the newly created Index.

Now, let’s ingest some data into elastic server for the newly created Index.

Step 3: Execute create document query

For creating a new document – firstdoc, provide the fields inside the JSON body in the below format.

PUT /firstindex/_doc/firstdoc

{

  “user” : “prem”,

  “message” : “this is the first message”

}

Now let’s search the Index – firstindex

GET /firstindex/_search

You see the query returns a hit count 1.

We have successfully created a new Index and added a new document to the index

Now go back to the Index pattern and create a new pattern

Step 3: Create an Index pattern for firstindex.

On the Management tab, create Index pattern.

Finish the two steps to complete the configuration.

You will see there are 9 fields in the Index by default.

Final step – let’s use the discover tab to search the elastic server using nice UI.

Click on the discover tab in the left panel.

You can select on which index you need to query.

On the fields, you can click add to add it as filter.

You will see our only added document in the elastic server.

Once you created right query, you can use the menu bar, to save the query. You can also open/share the query link.

Clicking on search, Kibana makes an API call, just like we saw before using dev tool,  to hit the elastic server and get the results.

We are end of the blog article

As a summary,

– We setup a Kibana server in our local machine.

– Using dev tools, we created a new index and registered a new document in the elastic index

– We created an Index patter for the newly created index.

– Using the discover tab, we are able to successfully query the document in the newly created Index.

Hope you enjoyed this article. Next is the very interesting post, where we will setup filebeat and inject Pega logs into elastic server and query the same from Kibana.

 

  • system-administration
Code Vault Curators

A technical team dedicated to empowering the Pega ecosystem with in-depth knowledge, guided by Premkumar Ganesan's vision.

Post navigation

Previous
Next

Pega Courses

Pega courses can be accessed at https://myknowacademy.com

Search through the blog

Tags

activity authentication background-processing case-management data-model declarative-processing email-processing file-processing pega-core-concepts pega-integration process reporting security system-administration user-interface validation

Categories

  • Code Vault

Recent posts

  • Service REST – Usage and Configurations in Pega
  • Queue processor – Usage and Configurations
  • Data Pages Usage & Configurations in Pega
  • Requestor types in Pega
  • Case Locking Mechanism in Pega

Related Articles

Code Vault

Queue processor – Usage and Configurations

December 18, 2024 Code Vault Curators

In this post we will see the architecture behind queue processor rule and all its configurations and usages. This tutorial is implemented using Pega personal edition 8.4, but the core concepts remain the same in higher versions as well What is a queue processor rule? – Used for background processing that makes use of queue […]

Code Vault

Requestor types in Pega

December 11, 2024 Code Vault Curators

In this blog article, we will see about different requestor types in Pega. This article is implemented using Pega Infinity ’24 version. First, let’s start with understanding the term – Requestor. What is a requestor? From the name, we can say that it can be any people or object which requests for a service. From […]

Code Vault

Property Optimization – Expose Columns in Pega

December 10, 2024 Code Vault Curators

In this blog article we will check the different ways through which we can expose properties in database table. First let’s see how the data (for example – Case data) gets saved into database table. We know Pega uses properties to hold the data. Say for example, I have created a new amazon sales case, […]

Code Vault

Docker – Part 2 – Setup Docker Desktop in Windows

December 10, 2024 Code Vault Curators

In this blog article, we will see how we can set up the docker desktop in Windows 10 home edition. You can visit previous blog article on containerisation basics. Tip: Since copy/paste is not possible in this article, I documented the shell commands in the following git repository, you can easily copy/paste from there. https://github.com/Prem1991/myknowpega/tree/master/docker […]

About

MyKnowTech was born with a mission to bridge the gap between technical expertise and business needs. We are a boutique firm specializing in Pega solutions, delivering them with a personal touch. At the heart of our philosophy is a commitment to putting clients first.

Company
  • About
  • Leadership
  • Career
  • Contact
Resources
  • Blog
  • Services
  • Solutions
  • Insights

©  MyKnowTech B.V. All Rights Reserved.

  • Sitemap
  • Terms & Conditions
  • Privacy Policy