Git Product home page Git Product logo

Comments (10)

schans avatar schans commented on September 17, 2024 3

Hi! Finally found some time to create a PR:

#1489

The gist is that setting agent.logFile: /dev/stdout will unset the -logFile command line option which make the agent log to stdout.

Please review. Any comments welcome.

from mongodb-kubernetes-operator.

uttammeena avatar uttammeena commented on September 17, 2024 2

I am having the same issue after upgrading the mongodb-operator from 0.7.6 to 0.8.3 (Looks like anything >0.7.8 has this issue)
By default it's logging as per AGENT_LOG_LEVEL to AGENT_LOG_FILE=/var/log/mongodb-mms-automation/automation-agent.log
However the moment I change AGENT_LOG_FILE=/dev/stdout it started logging everything like .trace as well as .debug
This is causing too much logging

Moreover, Following error is being logged while using logFile=/dev/stdout

[.error] [src/main/cm.go:main:118] Failed to create AsyncRollingFileAppender for full log file : open /dev/stdout-verbose: permission denied
[.error] [src/main/cm.go:main:119] [02:01:44.428] Failed to setup logging! :  Failed to create AsyncRollingFileAppender for full log file : open /dev/stdout-verbose: permission denied

from mongodb-kubernetes-operator.

schans avatar schans commented on September 17, 2024 1

The problem here seems to be that the mongo agent requires the absence of the logFile cmdline option to log to /dev/stdout. So if in the operator config the logFile is absent or set to /dev/stdout the cmdline should not include the logFile option part.

See:
https://stackoverflow.com/questions/13506198/mongodb-log-mongod-to-stdout

Although the official docs do not mention this:
https://www.mongodb.com/docs/ops-manager/current/reference/mongodb-agent-settings/#logging-settings

from mongodb-kubernetes-operator.

legal90 avatar legal90 commented on September 17, 2024 1

The issue is still actual

from mongodb-kubernetes-operator.

LinAnt avatar LinAnt commented on September 17, 2024

Damn, just deployed an operator upgrade and got paged that our log volumes are filling up with bloat...

from mongodb-kubernetes-operator.

github-actions avatar github-actions commented on September 17, 2024

This issue is being marked stale because it has been open for 60 days with no activity. Please comment if this issue is still affecting you. If there is no change, this issue will be closed in 30 days.

from mongodb-kubernetes-operator.

uttammeena avatar uttammeena commented on September 17, 2024

Issue is still valid and blocking the upgrade of mongodb-operator from 0.7.8 onwards

from mongodb-kubernetes-operator.

nammn avatar nammn commented on September 17, 2024

@schans change has been merged. Closing this Issue

Please follow this setting: #1439 (comment) to send to stderr/stdout instead of a file

from mongodb-kubernetes-operator.

schans avatar schans commented on September 17, 2024

Perfect. Thanks for your help!

from mongodb-kubernetes-operator.

chadlangston avatar chadlangston commented on September 17, 2024

Thank you! This is a huge help 🙏

from mongodb-kubernetes-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.