In IBM Cloud Private, when you run Liberty with JSON format logging in the console,
log events can be broken down into fields and stored in Elasticsearch. You can use Kibana to monitor
multiple Liberty pods with dashboards and
search, or you can filter a large number of log records with queries.
About this task
A Kubernetes deployment is composed of pods, which are composed of containers. In
IBM Cloud Private, the console output of each pod is
forwarded to the built-in elastic logging stack automatically. For more information about elastic
logging, see
IBM Cloud Private logging .
Procedure
Complete this task to browse the IBM Cloud Private catalog and select the appropriate Helm
chart, which you use to deploy applications.
- Enable JSON logging in your Helm chart.
- From the IBM Cloud Private console, click .
- Select ibm-websphere-liberty Helm chart [1.4.0+]*, in the Logs
section.
Note: If your Helm catalog does not contain this Helm chart when you access the console, select , and click the button to sync repositories to refresh the catalog.
- Set the Logging fields to the following default values:
Table 1. Helm chart fields and values for JSON logging GUI Field Name |
Command-Line Field Name |
Field Value |
Console logging format |
logs.consoleFormat |
json |
Console logging level |
logs.consoleLogLevel |
info |
Console logging source |
logs.consoleSource |
message,trace,accessLog,ffdc The following source types are supported:
messages, traces, access log records, and FFDC. Specify each source type in a comma-separated list
in the console logging source. Using access log requires addition settings in
server.xml file. For more information, see HTTP access logging.
|
Alternatively, you can set the previous values when you deploy the Liberty Helm chart from the command line by using
the --set flag.
- Deploy Kibana. After you deploy Liberty with JSON
logging enabled, log records are stored in Elasticsearch, and you can view the log records with
Kibana.
- To deploy Kibana, from the console, click .
- Select the ibm-icplogging-kibana Helm chart, and click
kube-system in the Target namespace.
- Click Install.
- Open Kibana.
- Click from the console.
- Select Kibana from the list of services.
- Click the link in the Node port field to open Kibana.
- Create an index pattern in Kibana.
- From Kibana, click . Type logstash-* for the Index name or Pattern.
- Select ibm_datetime as the Time Filter field name.
- Click Create.
Now, you can create your own queries, visualizations, or dashboards to analyze the log
data.
What to do next
You can also download a set of sample dashboards from https://github.com/WASdev/sample.dashboards. To import dashboards into Kibana, select , click Import.