Skip to content

Commit d18317f

Browse files
committed
Remove cluster logging from Viewing Logs topics
1 parent 4cfdf7d commit d18317f

File tree

7 files changed

+98
-92
lines changed

7 files changed

+98
-92
lines changed

_topic_map.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,8 +1685,8 @@ Topics:
16851685
File: cluster-logging-curator
16861686
- Name: Maintenance and support
16871687
File: cluster-logging-maintenance-support
1688-
- Name: Viewing cluster logs
1689-
File: cluster-logging-viewing
1688+
- Name: Viewing logs for a specific resource
1689+
File: viewing-resource-logs
16901690
- Name: Viewing cluster logs in Kibana
16911691
File: cluster-logging-visualizer
16921692
Distros: openshift-enterprise,openshift-origin

logging/cluster-logging-viewing.adoc

Lines changed: 0 additions & 17 deletions
This file was deleted.

logging/viewing-resource-logs.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[id="vewing-resource-logs"]
2+
= Viewing logs for a resource
3+
include::modules/common-attributes.adoc[]
4+
:context: viewing-resource-logs
5+
6+
toc::[]
7+
8+
You can view the logs for various resources, such as builds, deployments, and pods by using the OpenShift CLI (oc) and the web console.
9+
10+
[NOTE]
11+
====
12+
Resource logs are a default feature that provides limited log viewing capability. To enhance your log retrieving and viewing experience, it is recommended that you install xref:../logging/cluster-logging.adoc#cluster-logging[{product-title} cluster logging]. Cluster logging aggregates all the logs from your {product-title} cluster, such as node system audit logs, application container logs, and infrastructure logs, into a dedicated log store. You can then query, discover, and visualize your log data through the xref:../logging/cluster-logging-visualizer.adoc#cluster-logging-visualizer-using[Kibana interface]. Resource logs do not access the cluster logging log store.
13+
====
14+
15+
include::modules/viewing-resource-logs-cli-console.adoc[leveloffset=+1]
16+

modules/cluster-logging-viewing-logs-console.adoc

Lines changed: 0 additions & 37 deletions
This file was deleted.

modules/cluster-logging-viewing-logs.adoc

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * logging/viewing-resource-logs.adoc
4+
// * nodes/pods/nodes-pods-viewing.adoc
5+
6+
[id="viewing-resource-logs-cli-console_{context}"]
7+
= Viewing resource logs
8+
9+
You can view the log for various resources in the OpenShift CLI (oc) and web console. Logs read from the tail, or end, of the log.
10+
11+
.Prerequisites
12+
13+
* Access to the OpenShift CLI (oc).
14+
15+
.Procedure (UI)
16+
17+
. In the {product-title} console, navigate to *Workloads* -> *Pods* or navigate to the pod through the resource you want to investigate.
18+
+
19+
[NOTE]
20+
====
21+
Some resources, such as builds, do not have pods to query directly. In such instances, you can locate the *Logs* link on the *Details* page for the resource.
22+
====
23+
24+
. Select a project from the drop-down menu.
25+
26+
. Click the name of the pod you want to investigate.
27+
28+
. Click *Logs*.
29+
30+
.Procedure (CLI)
31+
32+
** View the log for a specific pod:
33+
+
34+
[source,terminal]
35+
----
36+
$ oc logs -f <pod_name> -c <container_name>
37+
----
38+
+
39+
--
40+
where:
41+
42+
`-f`:: Optional: Specifies that the output follows what is being written into the logs.
43+
`<pod_name>`:: Specifies the name of the pod.
44+
`<container_name>`:: Optional: Specifies the name of a container. When a pod has more than one container, you must specify the container name.
45+
--
46+
+
47+
For example:
48+
+
49+
[source,terminal]
50+
----
51+
$ oc logs ruby-58cd97df55-mww7r
52+
----
53+
+
54+
[source,terminal]
55+
----
56+
$ oc logs -f ruby-57f7f4855b-znl92 -c ruby
57+
----
58+
+
59+
The contents of log files are printed out.
60+
61+
** View the log for a specific resource:
62+
+
63+
[source,terminal]
64+
----
65+
$ oc logs <object_type>/<resource_name> <1>
66+
----
67+
<1> Specifies the resource type and name.
68+
+
69+
For example:
70+
+
71+
[source,terminal]
72+
----
73+
$ oc logs deployment/ruby
74+
----
75+
+
76+
The contents of log files are printed out.
77+

nodes/pods/nodes-pods-viewing.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ include::modules/nodes-pods-viewing-project.adoc[leveloffset=+1]
1818

1919
include::modules/nodes-pods-viewing-usage.adoc[leveloffset=+1]
2020

21+
include::modules/viewing-resource-logs-cli-console.adoc[leveloffset=+1]
22+
23+

0 commit comments

Comments
 (0)