Skip to main content
Version: v11.9.3

Kibana


Introduction

As WaveMaker is a distributed application, each microservice generates its logs in its own container. These logs are very important to analyze or fix any issue in the Platform.

Traditionally, you should to do the following to access the log statements.

  • Obtain remote server access.
  • Know the required details to connect to the server
  • Access the container
  • Open the application logs file using a CLI text editor
  • Search for the required log statements using the basic string search provided by the CLI text editor.

It gets more and more difficult if the logs are supposed to be shared with someone else or if you want to check the logs which have been generated a couple of days ago.

Kibana solves all these problems by making the logs easily accessible. One can also easily share the logs across the team with a single URL. The logs are also secure as they can only be accessed by authenticated users.

note

For more information, see Kibana's Opensource repository.

info

Kibana is purely used for the logs generated by the Platform. Application logs generated by the apps developed in WaveMaker are never pushed to Kibana.

How to access Kibana

  1. Once you login to WaveMaker, open Launchpad and click Troubleshoot located on the bottom left as shown below.

Launchpad Dial Click

  1. From the Troubleshoot menu, click "Kibana", as shown below.

Launchpad Logs Click

  1. It opens the Kibana home page. The home page should look like the below image.

Kibana Home Page

  1. To search for logs using Kibana, go to "Discover" located in the left navigation bar.

Kibana Discover Click

  1. Finally, you should see the following screen.

Kibana Discover Page

Use Case 1

Accessing specific Microservice log (Container-Services) from Kibana.

  • Select Discover from the Kibana and add the Filter by selecting log_file_name.keyword as container-services.

Filter Icon

  • Below screenshot displays the searched filter results of edn-services.

Filter Icon

Use Case 2

Accessing all Microservices log from the Kibana dashboard.

  • From Kibana, click Dashboard and Select MicroServiceLogs which is a predefined dashboard in Kibana.
  • Below screenshot displays logs of all the available microservices. Filter Icon

Data is pixelated for privacy reasons.

note

The Discover page is where you will be able to filter through all the logs.

Kibana Filters

The required logs can be searched by applying appropriate filters. The below tables list out the most frequently used filters.

Application log filters

FilterDescriptionExample Value
user.keywordGet the logs printed in the user context by using the user login IDuser1@my-wme.com
classname.keywordThe log statements printed by a java classo.s.w.c.RestTemplate ( here, the fully qualified name is of the java class is *org.springframework.web.client.RestTemplate* )
host.keywordThe local IP of the machine from which the logs are collected10.0.22.135
log-level.keywordThe log level used for printing the log statementINFO, DEBUG, WARN, ERROR
message.keywordThe actual log statementcan be any string
tag.keywordThe Platform microservice nameremote-studio, jobs-service , jobs-worker, etc
thread.keywordThe logs belonging to a particular java thread idhttp-nio-8008-exec-3

Similarly, Access logs are also pushed to Elastic Search. They can be also be filtered using the below filters.

Access log filters

FilterDescriptionExample Value
reqmethod.keywordThe request method of access logsGET, PUT, etc.
type.keywordHTTP request TypeHTTP/1.1
uri.keywordThe URI of the backend API call/index.html
url.keywordThe URL of the backend API callhttps://www.my-wme.com/studio/
client_ip.keywordThe IP of the client who made the API call127.127.127.127

The .keyword suffix mentioned in all the above filters is optional. Adding it will just help in auto-suggestion.

note

Apart from the filters mentioned above, Kibana supports many more filters, however, the above-specified filters should be suitable in most cases.

How to Apply Filters

Now that we know the filters which can be applied, let us check how to apply filters in the below example.

tip

Let's say we want to filter the message of the INFO log statements from all the log statements generated by the platform.

  1. In the Kibana's Discover page, click the "Add a filter" button on the top left.

Kibana Home Page

  1. Use log-level.keyword as the filter type.

Kibana Home Page

  1. Select is as the operation.

Kibana Home Page

  1. Type INFO in the value field.

Kibana Home Page

That's all.

But, as we want to check the messages, we can add that as a field by doing the following.

5) Click the "add" button beside the "message" label as shown in the below image.

Kibana Home Page

6) Finally, this is what it should look like.

Kibana Home Page

Some Common Use Cases

  1. Accessing Specific MicroService logs from Kibana.
  • Select Discover from the Kibana and add the Filter by selecting tag.keyword. A drop down with the list of microservices will display. Select the microservice ex:lbaccess log and save to apply the filter.

    Filter Icon

  • Below screenshot displays the searched filter results of lbaccess log.

    Filter Icon

  • Similarly, Filter can be applied to other services, such as Login, EDN-Services, Developer-Cloud, Studio, Launchpad, and more.

  1. Fetching logs based on the Status Code.
  • Select Discover from the Kibana and apply the Filter by selecting status.keyword. A drop down with the list of status codes will display. Select the status code and save to apply the filter. The below screenshot displays the searched filter results of status code 200.

    Filter Icon