Skip to content

Commit a569396

Browse files
authored
Merge pull request #74681 from eromanova97/OBSDOCS-912
OBSDOCS-912: Document how to configure audit logging for Metrics Server
2 parents 84bdbc2 + 550bd52 commit a569396

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * observability/monitoring/configuring-the-monitoring-stack.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="configuring-audit-logs-for-metrics-server_{context}"]
7+
= Configuring audit logs for Metrics Server
8+
9+
You can configure audit logs for Metrics Server to help you troubleshoot issues with the server.
10+
Audit logs record the sequence of actions in a cluster. It can record user, application, or control plane activities.
11+
12+
You can set audit log rules, which determine what events are recorded and what data they should include. This can be achieved with the following audit profiles:
13+
14+
* *Metadata (default)*: This profile enables the logging of event metadata including user, timestamps, resource, and verb. It does not record request and response bodies.
15+
* *Request*: This enables the logging of event metadata and request body, but it does not record response body. This configuration does not apply for non-resource requests.
16+
* *RequestResponse*: This enables the logging of event metadata, and request and response bodies. This configuration does not apply for non-resource requests.
17+
* *None*: None of the previously described events are recorded.
18+
19+
You can configure the audit profiles by modifying the `cluster-monitoring-config` config map.
20+
The following example sets the profile to `Request`, allowing the logging of event metadata and request body for Metrics Server:
21+
22+
[source,yaml]
23+
----
24+
apiVersion: v1
25+
kind: ConfigMap
26+
metadata:
27+
name: cluster-monitoring-config
28+
namespace: openshift-monitoring
29+
data:
30+
config.yaml: |
31+
metricsServer:
32+
audit:
33+
profile: Request
34+
----

observability/monitoring/configuring-the-monitoring-stack.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,11 @@ ifndef::openshift-dedicated,openshift-rosa[]
213213
* For information about how to get your cluster ID, see xref:../../support/gathering-cluster-data.adoc#support-get-cluster-id_gathering-cluster-data[Obtaining your cluster ID].
214214
endif::openshift-dedicated,openshift-rosa[]
215215

216+
ifndef::openshift-dedicated,openshift-rosa[]
217+
// Configuring audit logs for Metrics Server
218+
include::modules/monitoring-configuring-audit-logs-for-metrics-server.adoc[leveloffset=+1]
219+
endif::openshift-dedicated,openshift-rosa[]
220+
216221
// Configuring metrics collection profiles
217222
// TP features are excluded from OSD and ROSA. When this feature is GA, it can be included in the OSD/ROSA docs.
218223
ifndef::openshift-dedicated,openshift-rosa[]

0 commit comments

Comments
 (0)