Skip to content

Commit 97e1781

Browse files
committed
Merged option
1 parent 7c103da commit 97e1781

File tree

3 files changed

+40
-82
lines changed

3 files changed

+40
-82
lines changed

modules/monitoring-setting-log-levels-for-monitoring-components.adoc

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,21 @@
2525
:component-name: Thanos Ruler
2626
// end::UWM[]
2727

28+
// tag::CPM[]
29+
You can configure the log level for Alertmanager, Prometheus Operator, Prometheus, and {component-name} and log verbosity for Metrics Server.
30+
// end::CPM[]
31+
// tag::UWM[]
2832
You can configure the log level for Alertmanager, Prometheus Operator, Prometheus, and {component-name}.
29-
33+
// end::UWM[]
34+
You can use these settings for troubleshooting and to gain better insight into how the components are functioning.
3035

3136
The following log levels can be applied to the relevant component in the `{configmap-name}` `ConfigMap` object:
3237

3338
* `debug`. Log debug, informational, warning, and error messages.
34-
* `info`. Log informational, warning, and error messages.
39+
* `info` (default). Log informational, warning, and error messages.
3540
* `warn`. Log warning and error messages only.
3641
* `error`. Log error messages only.
3742
38-
The default log level is `info`.
39-
40-
// tag::CPM[]
41-
[NOTE]
42-
====
43-
The Metrics Server component uses a different logging configuration method. For more information, see "Setting log verbosity for Metrics Server".
44-
====
45-
// end::CPM[]
46-
4743
.Prerequisites
4844

4945
// tag::CPM[]
@@ -85,30 +81,57 @@ data:
8581
config.yaml: |
8682
<component>: # <1>
8783
logLevel: <log_level> # <2>
84+
# tag::CPM[]
85+
metricsServer:
86+
verbosity: <value> # <3>
87+
# end::CPM[]
88+
# ...
8889
----
89-
<1> The monitoring stack component for which you are setting a log level.
90+
<1> Specify the monitoring stack component for which you are setting a log level.
9091
Available component values are `{prometheus}`, `{alertmanager}`, `prometheusOperator`, and `{thanos}`.
91-
<2> The log level to set for the component.
92+
<2> Specify the log level for the component.
9293
The available values are `error`, `warn`, `info`, and `debug`.
9394
The default value is `info`.
95+
// tag::CPM[]
96+
<3> Specify the verbosity for the Metrics Server.
97+
Valid values are positive integers.
98+
Increasing the number increases the amount of logged events, values over `10` are usually unnecessary.
99+
The default value is `0`.
100+
// end::CPM[]
94101

95102
. Save the file to apply the changes. The pods affected by the new configuration are automatically redeployed.
96103

97-
. Confirm that the log level has been applied by reviewing the deployment or pod configuration in the related project.
98-
The following example checks the log level for the `prometheus-operator` deployment:
104+
. Verify that the log configuration is applied by reviewing the deployment or pod configuration in the related project.
105+
106+
** The following example checks the log level for the `prometheus-operator` deployment:
99107
+
100108
[source,terminal,subs="attributes+"]
101109
----
102110
$ oc -n {namespace-name} get deploy prometheus-operator -o yaml | grep "log-level"
103111
----
104112
+
105113
.Example output
106-
[source,terminal,subs="attributes+"]
114+
[source,terminal]
107115
----
108116
- --log-level=debug
109117
----
110118

111-
. Check that the pods for the component are running. The following example lists the status of pods:
119+
// tag::CPM[]
120+
** The following example checks the log verbosity for the `metrics-server` deployment:
121+
+
122+
[source,terminal]
123+
----
124+
$ oc -n openshift-monitoring get deploy metrics-server -o yaml | grep -- --v=
125+
----
126+
+
127+
.Example output
128+
[source,terminal]
129+
----
130+
- --v=3
131+
----
132+
// end::CPM[]
133+
134+
. Verify that the pods for the component are running:
112135
+
113136
[source,terminal,subs="attributes+"]
114137
----

modules/monitoring-setting-log-verbosity-for-metrics-server.adoc

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

observability/monitoring/configuring-core-platform-monitoring/storing-and-recording-data.adoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ include::modules/monitoring-modifying-retention-time-and-size-for-prometheus-met
4444
// Configuring audit logs for Metrics Server
4545
include::modules/monitoring-configuring-audit-logs-for-metrics-server.adoc[leveloffset=+1]
4646

47-
// Setting log verbosity for Metrics Server
48-
include::modules/monitoring-setting-log-verbosity-for-metrics-server.adoc[leveloffset=+1]
49-
5047
// Setting log levels for monitoring components
5148
include::modules/monitoring-setting-log-levels-for-monitoring-components.adoc[leveloffset=+1,tags=**;CPM;!UWM]
5249

0 commit comments

Comments
 (0)