This is a cache of https://docs.openshift.com/container-platform/4.4/logging/cluster-logging-viewing.html. It is a snapshot of the page at 2024-11-28T01:30:38.936+0000.
Viewing cluster logs | Logging | OpenShift Container Platform 4.4
×

You can view OpenShift Container Platform cluster logs in the cli or OpenShift Container Platform web console.

Viewing cluster logs

You can view cluster logs in the cli.

Prerequisites
  • Cluster logging and Elasticsearch must be installed.

Procedure

To view cluster logs:

Use the oc logs [-f] <pod_name> command, where the -f is optional.

$ oc logs -f <any-fluentd-pod> -n openshift-logging (1)
1 Specify the name of a log collector pod. Use the -f option to follow what is being written into the logs.

For example

$ oc logs -f fluentd-ht42r -n openshift-logging

The contents of log files are printed out.

By default, Fluentd reads logs from the tail, or end, of the log.

Viewing cluster logs in the OpenShift Container Platform web console

You can view cluster logs in the OpenShift Container Platform web console .

Prerequisites
  • Cluster logging and Elasticsearch must be installed.

Procedure

To view cluster logs:

  1. In the OpenShift Container Platform console, navigate to WorkloadsPods.

  2. Select the openshift-logging project from the drop-down menu.

  3. click one of the logging collector pods with the fluentd prefix.

  4. click Logs.

By default, Fluentd reads logs from the tail, or end, of the log.