Mongodb – How to disable ChunkManager logging for MongoDB? mongoconfig.log gets huge

mongodbmongodb-3.4

I'm using MongoDB 3.4 for saving other systems logs and mongoconfig.log is getting too much verbosity. It's a sharded clusted, if that helps.

I checked the default mongo log verbosity and is set at default (0). But I believe this is another setting not found under /etc/mongod.conf

2017-06-13T02:54:44.868-0400 I SHARDING [Balancer] ChunkManager loading chunks for collection_user sequenceNumber: 36210965 based on: (empty)
2017-06-13T02:54:44.915-0400 I SHARDING [Balancer] ChunkManager load took 46 ms and found version 2392|1||58ade4d8189e1651990a98d2
2017-06-13T02:54:44.920-0400 I SHARDING [Balancer] ChunkManager loading chunks for collection_user sequenceNumber: 36210966 based on: (empty)
2017-06-13T02:54:44.921-0400 I SHARDING [Balancer] ChunkManager load took 0 ms and found version 3|10||58adf0e5189e1651990d9af8
2017-06-13T02:54:44.921-0400 I SHARDING [Balancer] ChunkManager loading chunks for collection_user sequenceNumber: 36210967 based on: (empty)
2017-06-13T02:54:45.026-0400 I SHARDING [Balancer] ChunkManager load took 104 ms and found version 4385|1||58adf0ed189e1651990d9c89
2017-06-13T02:54:45.035-0400 I SHARDING [Balancer] ChunkManager loading chunks for collection_user sequenceNumber: 36210968 based on: (empty)
2017-06-13T02:54:45.127-0400 I SHARDING [Balancer] ChunkManager load took 92 ms and found version 4258|1||58adf0f4189e1651990d9dd4
2017-06-13T02:54:45.136-0400 I SHARDING [Balancer] ChunkManager loading chunks for collection_user sequenceNumber: 36210969 based on: (empty)
2017-06-13T02:54:45.162-0400 I SHARDING [Balancer] ChunkManager load took 26 ms and found version 1349|1||58adf0f9189e1651990d9f26

Getting log components information returns this:

db.getLogComponents()
{
    "verbosity" : 0,
    "accessControl" : {
        "verbosity" : -1
    },
    "command" : {
        "verbosity" : -1
    },
    "control" : {
        "verbosity" : -1
    },
    "executor" : {
        "verbosity" : -1
    },
    "geo" : {
        "verbosity" : -1
    },
    "index" : {
        "verbosity" : -1
    },
    "network" : {
        "verbosity" : -1,
        "asio" : {
            "verbosity" : -1
        },
        "bridge" : {
            "verbosity" : -1
        }
    },
    "query" : {
        "verbosity" : -1
    },
    "replication" : {
        "verbosity" : -1
    },
    "sharding" : {
        "verbosity" : -1
    },
    "storage" : {
        "verbosity" : -1,
        "journal" : {
            "verbosity" : -1
        }
    },
    "write" : {
        "verbosity" : -1
    },
    "ftdc" : {
        "verbosity" : -1
    },
    "tracking" : {
        "verbosity" : -1
    }
}

Best Answer

I have not tested this myself.

Reference:

  1. https://docs.mongodb.com/manual/reference/configuration-options/#systemlog-options
  2. https://docs.mongodb.com/manual/reference/program/mongos/
  3. https://docs.mongodb.com/manual/reference/command/

You can do this by:

systemLog.quiet Type: boolean

Run mongos or mongod in a quiet mode that attempts to limit the amount of output.

systemLog.quiet is not recommended for production systems as it may make tracking problems during particular connections much more difficult.

--quiet

Runs mongos in a quiet mode that attempts to limit the amount of output.

This option suppresses:

  • output from database commands

  • replication activity connection accepted

  • events connection

  • closed events

All Sharding Commands are listed under database commands which I assume will suppress the logging you are referring to.