Skip to content

Commit 13f89e2

Browse files
erabil-mdbjwilliams-mongo
authored andcommitted
(DOCSP-41486) Adds updates for full log rotation support. (#1786)
* (DOCSP-41486) Adds updates for full log rotation support. * Revises per first-round tech review. * Revises per edits from tech and copy review. * Fixes build errors. * Revises per second-round copy review.
1 parent d70ca56 commit 13f89e2

9 files changed

+656
-48
lines changed

source/includes/code-examples/yaml-files/example-mongodb-logging-config.yaml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,37 @@ spec:
2222
# https://docs.opsmanager.mongodb.com/current/reference/mongodb-agent-settings/
2323
agent:
2424
startupOptions:
25-
maxLogFiles: "4"
26-
maxLogFileDurationHrs: "1"
27-
maxUncompressedLogFiles: "2"
25+
maxLogFiles: 10
26+
maxLogFileSize: 2
27+
readinessProbe:
28+
environmentVariables:
29+
READINESS_PROBE_LOGGER_MAX_SIZE: 10
30+
READINESS_PROBE_LOGGER_BACKUPS: 1
31+
READINESS_PROBE_LOGGER_MAX_AGE: 3
32+
READINESS_PROBE_LOGGER_COMPRESS: true
33+
MDB_WITH_AGENT_FILE_LOGGING: false
34+
LOG_FILE_PATH: /var/log/mongodb-mms-automation/readiness.log
35+
backupAgent:
36+
logRotate:
37+
sizeThresholdMB: 10
38+
timeThresholdHrs: 10
39+
monitoringAgent:
40+
logRotate:
41+
sizeThresholdMB: 10
42+
timeThresholdHrs: 10
43+
# For Ops Manager 6, you can only configure mongod logs with this setting starting with version 6.0.2.
44+
# For Ops Manager 7, you can only configure mongod logs with this setting starting with version 7.0.4.
45+
# For previous Ops Manager versions, you must configure mongod logs using the Ops Manager UI.
46+
mongod:
47+
logRotate:
48+
sizeThresholdMB: 10
49+
timeThresholdHrs: 10
50+
numUncompressed: 10
51+
numTotal: 10
52+
percentOfDiskspace: 10
53+
auditLogRotate:
54+
sizeThresholdMB: 10
55+
timeThresholdHrs: 10
56+
numUncompressed: 10
57+
numTotal: 10
58+
percentOfDiskspace: 10

source/includes/code-examples/yaml-files/example-ops-manager-logging-config.yaml

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,42 @@ spec:
1111
version: "6.0.11-ent"
1212
members: 3
1313
agent:
14-
#AppDB (mongod) log rotation
15-
logRotate:
16-
numTotal: 4
17-
numUncompressed: 2
18-
timeThresholdHrs: 1
19-
sizeThresholdMB: "10"
20-
#Automation Agent log rotation
21-
startupOptions:
22-
maxLogFiles: "4"
23-
maxLogFileDurationHrs: "1"
24-
maxUncompressedLogFiles: "2"
14+
#agent.logRotate is deprecated and overwritten by agent.mongod.logRotate.
15+
logRotate:
16+
#Automation Agent log rotation
17+
startupOptions:
18+
maxLogFiles: 10
19+
maxLogFileSize: 2
20+
#Readiness probe log rotation
21+
readinessProbe:
22+
environmentVariables:
23+
READINESS_PROBE_LOGGER_MAX_SIZE: 10
24+
READINESS_PROBE_LOGGER_BACKUPS: 1
25+
READINESS_PROBE_LOGGER_MAX_AGE: 3
26+
READINESS_PROBE_LOGGER_COMPRESS: true
27+
MDB_WITH_AGENT_FILE_LOGGING: false
28+
LOG_FILE_PATH: /var/log/mongodb-mms-automation/readiness.log
29+
#AppDB backup log rotation
30+
backupAgent:
31+
logRotate:
32+
sizeThresholdMB: 10
33+
timeThresholdHrs: 10
34+
#AppDB Monitoring Agent log rotation
35+
monitoringAgent:
36+
logRotate:
37+
sizeThresholdMB: 10
38+
timeThresholdHrs: 10
39+
#AppDB (mongod) log rotation
40+
mongod:
41+
logRotate:
42+
sizeThresholdMB: 10
43+
timeThresholdHrs: 10
44+
numUncompressed: 10
45+
numTotal: 10
46+
percentOfDiskspace: 10
47+
auditLogRotate:
48+
sizeThresholdMB: 10
49+
timeThresholdHrs: 10
50+
numUncompressed: 10
51+
numTotal: 10
52+
percentOfDiskspace: 10
Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,64 @@
11
.. list-table::
2-
:widths: 33 33 33
2+
:widths: 25 25 25 25
33
:header-rows: 1
44

55
* - Component
6-
- Log type
7-
- Configuration location
6+
- Log type
7+
- CRD manifest configuration
8+
- Default configuration location
89

910
* - MongoDB
1011
- Automation agent logs
12+
- :setting:`MongoDB CRD <spec.agent.startupOptions>`
1113
- :setting:`spec.agent.startupOptions`
1214

1315
* - MongoDB
1416
- {+monitoring-agent+} logs
17+
- :setting:`MongoDB CRD <spec.agent.monitoringAgent.logRotate>`
1518
- Ops Manager API or UI
1619

1720
* - MongoDB
1821
- Backup logs
22+
- :setting:`MongoDB CRD <spec.agent.backupAgent.logRotate>`
1923
- Ops Manager API or UI
2024

2125
* - MongoDB
2226
- MongoDB logs
27+
- |onprem| 7.0.4, 6.0.24, or later: :setting:`MongoDB CRD <spec.agent.mongod.logRotate>`
2328
- Ops Manager UI
2429

2530
* - MongoDB
2631
- Audit logs
32+
- :setting:`MongoDB CRD <spec.agent.mongod.auditlogRotate>`
2733
- Ops Manager UI
2834

2935
* - MongoDB
3036
- Readiness Probe
37+
- :setting:`MongoDB CRD <spec.agent.readinessProbe.environmentVariables>`
3138
- `Container Environment Variables <https://www.mongodb.com/docs/kubernetes-operator/master/reference/kubectl-operator-settings/#readiness-probe-logger-max-size>`__
3239

3340
* - {+appdb+}
3441
- MongoDB Logs
35-
- :opsmgrkube:`spec.applicationDatabase.agent.logRotate`
42+
- :opsmgrkube:`MongoDBOpsManager CRD <spec.applicationDatabase.agent.<component>.logRotate>`
43+
- :opsmgrkube:`spec.applicationDatabase.agent.mongod.logRotate <spec.applicationDatabase.agent.<component>.logRotate>`
3644

3745
* - {+appdb+}
3846
- Automation Agent Logs
47+
- :opsmgrkube:`MongoDBOpsManager CRD <spec.applicationDatabase.agent.startupOptions>`
3948
- :opsmgrkube:`spec.applicationDatabase.agent.startupOptions`
4049

4150
* - {+appdb+}
4251
- {+monitoring-agent+} logs
52+
- :opsmgrkube:`MongoDBOpsManager CRD <spec.applicationDatabase.agent.<component>.logRotate>`
4353
- Forwarded to ``stdout`` only (kubectl logs).
4454
Managed and stored in the |k8s| control plane.
4555

4656
* - {+appdb+}
4757
- Audit logs
48-
- :opsmgrkube:`spec.applicationDatabase.agent.logRotate.includeAuditLogsWithMongoDBLogs`
58+
- :opsmgrkube:`MongoDBOpsManager CRD <spec.applicationDatabase.agent.mongod.auditlogRotate>`
59+
- :opsmgrkube:`spec.applicationDatabase.agent.mongod.auditlogRotate`
60+
61+
* - |onprem|
62+
- |onprem| logs
63+
- :ref:`MongoDBOpsManager CRD <k8s-om-log-rotation-crd>`
64+
- :ref:`logback.xml configuration file <onprem-own-logs>`
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Replace *component* with one of the following values:
2+
3+
- ``mongod``
4+
- ``backupAgent``
5+
- ``monitoringAgent``

0 commit comments

Comments
 (0)