This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 5. Viewing cluster logs
You can view OpenShift Container Platform cluster logs in the CLI or OpenShift Container Platform web console.
5.1. 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
$ oc logs -f <any-fluentd-pod> -n openshift-logging
- 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
$ 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.
5.2. 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:
-
In the OpenShift Container Platform console, navigate to Workloads
Pods. -
Select the
openshift-logging
project from the drop-down menu. -
Click one of the logging collector pods with the
fluentd
prefix. - Click Logs.
By default, Fluentd reads logs from the tail, or end, of the log.