Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit 2e94145

Browse files
authored
[logs] add verbose agent logs and default log path (#1200)
1 parent 7b6e854 commit 2e94145

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controllers/construct/mongodbstatefulset.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ const (
4747

4848
automationAgentOptions = " -skipMongoStart -noDaemonize -useLocalMongoDbTools"
4949

50+
automationAgentLogOptions = " -logFile /var/log/mongodb-mms-automation/automation-agent.log -maxLogFileDurationHrs 24 -logLevel DEBUG"
51+
5052
MongodbUserCommand = `current_uid=$(id -u)
5153
AGENT_API_KEY="$(cat /mongodb-automation/agent-api-key/agentApiKey)"
5254
declare -r current_uid
@@ -189,7 +191,7 @@ func BaseAgentCommand() string {
189191
}
190192

191193
func AutomationAgentCommand() []string {
192-
return []string{"/bin/bash", "-c", MongodbUserCommand + BaseAgentCommand() + " -cluster=" + clusterFilePath + automationAgentOptions}
194+
return []string{"/bin/bash", "-c", MongodbUserCommand + BaseAgentCommand() + " -cluster=" + clusterFilePath + automationAgentOptions + automationAgentLogOptions}
193195
}
194196

195197
func mongodbAgentContainer(automationConfigSecretName string, volumeMounts []corev1.VolumeMount) container.Modification {

0 commit comments

Comments
 (0)