Created
November 13, 2019 00:17
-
-
Save kenmsj/16086499a0c9b3722bea1068b0ccd39e to your computer and use it in GitHub Desktop.
Full configuration of mongod.conf and mongos.conf file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Full configuration of mongod and mongos file, based on MongoDB 3.6. | |
# Includes links for official docs, for each section of config. | |
# | |
# Are not mentioned in this document: | |
# - Deprecated options as of 3.6; | |
# - Options only available to mmapv1; | |
# - Windows Service Options; | |
# | |
# This document is divided as follows: | |
# - Options for both mongod and mongos; | |
# - Options only for mongod; | |
# - Options only for mongos; | |
# - Server parameters; | |
# | |
# Options that are available only for MongoDB Enterprise are commented as such. | |
# | |
# ==================================================================================== | |
# Options for both mongod and mongos: | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#systemlog-options | |
systemLog: | |
verbosity: <int> | |
quiet: <boolean> | |
traceAllExceptions: <boolean> | |
syslogFacility: <string> | |
path: <string> | |
logAppend: <boolean> | |
logRotate: <string> | |
destination: <string> | |
timeStampFormat: <string> | |
component: | |
accessControl: | |
verbosity: <int> | |
command: | |
verbosity: <int> | |
control: | |
verbosity: <int> | |
ftdc: | |
verbosity: <int> | |
geo: | |
verbosity: <int> | |
index: | |
verbosity: <int> | |
network: | |
verbosity: <int> | |
query: | |
verbosity: <int> | |
replication: | |
verbosity: <int> | |
heartbeats: | |
verbosity: <int> | |
rollback: | |
verbosity: <int> | |
sharding: | |
verbosity: <int> | |
storage: | |
verbosity: <int> | |
journal: | |
verbosity: <int> | |
write: | |
verbosity: <int> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#processmanagement-options | |
processManagement: | |
fork: <boolean> | |
pidFilePath: <string> | |
timeZoneInfo: <string> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#net-options | |
net: | |
port: <int> | |
bindIp: <string> | |
bindIpAll: <string> | |
maxIncomingConnections: <int> | |
wireObjectCheck: <boolean> | |
ipv6: <boolean> | |
unixDomainSocket: | |
enabled: <boolean> | |
pathPrefix: <string> | |
filePermissions: <int> | |
ssl: | |
mode: <string> | |
PEMKeyFile: <string> | |
PEMKeyPassword: <string> | |
clusterFile: <string> | |
clusterPassword: <string> | |
CAFile: <string> | |
CRLFile: <string> | |
allowConnectionsWithoutCertificates: <boolean> | |
allowInvalidCertificates: <boolean> | |
allowInvalidHostnames: <boolean> | |
disabledProtocols: <string> | |
FIPSMode: <boolean> # MongoDB Enterprise only | |
compression: | |
compressors: <string> | |
transportLayer: <string> | |
serviceExecutor: <string> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#security-options | |
security: | |
keyFile: <string> | |
clusterAuthMode: <string> | |
transitionToAuth: <boolean> | |
javascriptEnabled: <boolean> | |
redactClientLogData: <boolean> # MongoDB Enterprise only | |
sasl: | |
hostName: <string> | |
serviceName: <string> | |
saslauthdSocketPath: <string> | |
enableEncryption: <boolean> # MongoDB Enterprise only | |
encryptionCipherMode: <string> # MongoDB Enterprise only | |
encryptionKeyFile: <string> # MongoDB Enterprise only | |
kmip: # MongoDB Enterprise only | |
keyIdentifier: <string> # MongoDB Enterprise only | |
rotateMasterKey: <boolean> # MongoDB Enterprise only | |
serverName: <string> # MongoDB Enterprise only | |
port: <string> # MongoDB Enterprise only | |
clientCertificateFile: <string> # MongoDB Enterprise only | |
clientCertificatePassword: <string> # MongoDB Enterprise only | |
serverCAFile: <string> # MongoDB Enterprise only | |
ldap: # MongoDB Enterprise only | |
servers: <string> # MongoDB Enterprise only | |
bind: # MongoDB Enterprise only | |
method: <string> # MongoDB Enterprise only | |
saslMechanism: <string> # MongoDB Enterprise only | |
queryUser: <string> # MongoDB Enterprise only | |
queryPassword: <string> # MongoDB Enterprise only | |
useOSDefaults: <boolean> # MongoDB Enterprise + Windows only | |
transportSecurity: <string> # MongoDB Enterprise only | |
timeoutMS: <int> # MongoDB Enterprise only | |
userToDNMapping: <string> # MongoDB Enterprise only | |
authz: # MongoDB Enterprise only | |
queryTemplate: <string> # MongoDB Enterprise only | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#auditlog-options | |
auditLog: # MongoDB Enterprise only | |
destination: <string> # MongoDB Enterprise only | |
format: <string> # MongoDB Enterprise only | |
path: <string> # MongoDB Enterprise only | |
filter: <string> # MongoDB Enterprise only | |
# ==================================================================================== | |
# Options only for mongod: | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#security.authorization | |
security: | |
authorization: <string> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#storage-options | |
storage: | |
dbPath: <string> | |
indexBuildRetry: <boolean> | |
repairPath: <string> | |
journal: | |
enabled: <boolean> | |
commitIntervalMs: <num> | |
directoryPerDB: <boolean> | |
syncPeriodSecs: <int> | |
engine: <string> | |
wiredTiger: | |
engineConfig: | |
cacheSizeGB: <number> | |
journalCompressor: <string> | |
directoryForIndexes: <boolean> | |
collectionConfig: | |
blockCompressor: <string> | |
indexConfig: | |
prefixCompression: <boolean> | |
inMemory: # MongoDB Enterprise only | |
engineConfig: # MongoDB Enterprise only | |
inMemorySizeGB: <number> # MongoDB Enterprise only | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#operationprofiling-options | |
operationProfiling: | |
slowOpSampleRate: <double> | |
slowOpThresholdMs: <int> | |
mode: <string> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#replication-options | |
replication: | |
oplogSizeMB: <int> | |
replSetName: <string> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#sharding-options | |
sharding: | |
clusterRole: <string> | |
archiveMovedChunks: <boolean> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#snmp-options | |
snmp: | |
subagent: <boolean> | |
master: <boolean> | |
basisTech: | |
rootDirectory: <string> # MongoDB Enterprise only | |
# ==================================================================================== | |
# Options only for mongos: | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#mongos-only-options | |
replication: | |
localPingThresholdMs: <int> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/configuration-options/index.html#sharding.configDB | |
sharding: | |
configDB: <string> # <configReplSetName>/cfg1.example.net:27017, cfg2.example.net:27017,... | |
# ==================================================================================== | |
# Server parameters: | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/manual/reference/parameters/ | |
setParameter: | |
key: value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Full configuration of mongod and mongos file, based on MongoDB 3.4. | |
# Includes links for official docs, for each section of config. | |
# | |
# Are not mentioned in this document: | |
# - Deprecated options as of 3.4; | |
# - Options only available to mmapv1; | |
# - Windows Service Options; | |
# | |
# This document is divided as follows: | |
# - Options for both mongod and mongos; | |
# - Options only for mongod; | |
# - Options only for mongos; | |
# - Server parameters; | |
# | |
# Options that are available only for MongoDB Enterprise are commented as such. | |
# | |
# ==================================================================================== | |
# Options for both mongod and mongos: | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#systemlog-options | |
systemLog: | |
verbosity: <int> | |
quiet: <boolean> | |
traceAllExceptions: <boolean> | |
syslogFacility: <string> | |
path: <string> | |
logAppend: <boolean> | |
logRotate: <string> | |
destination: <string> | |
timeStampFormat: <string> | |
component: | |
accessControl: | |
verbosity: <int> | |
command: | |
verbosity: <int> | |
control: | |
verbosity: <int> | |
ftdc: | |
verbosity: <int> | |
geo: | |
verbosity: <int> | |
index: | |
verbosity: <int> | |
network: | |
verbosity: <int> | |
query: | |
verbosity: <int> | |
replication: | |
verbosity: <int> | |
sharding: | |
verbosity: <int> | |
storage: | |
verbosity: <int> | |
journal: | |
verbosity: <int> | |
write: | |
verbosity: <int> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#processmanagement-options | |
processManagement: | |
fork: <boolean> | |
pidFilePath: <string> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#net-options | |
net: | |
port: <int> | |
bindIp: <string> | |
maxIncomingConnections: <int> | |
wireObjectCheck: <boolean> | |
ipv6: <boolean> | |
unixDomainSocket: | |
enabled: <boolean> | |
pathPrefix: <string> | |
filePermissions: <int> | |
ssl: | |
mode: <string> | |
PEMKeyFile: <string> | |
PEMKeyPassword: <string> | |
clusterFile: <string> | |
clusterPassword: <string> | |
CAFile: <string> | |
CRLFile: <string> | |
allowConnectionsWithoutCertificates: <boolean> | |
allowInvalidCertificates: <boolean> | |
allowInvalidHostnames: <boolean> | |
disabledProtocols: <string> | |
FIPSMode: <boolean> # MongoDB Enterprise only | |
compression: | |
compressors: <string> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#security-options | |
security: | |
keyFile: <string> | |
clusterAuthMode: <string> | |
authorization: <string> | |
transitionToAuth: <boolean> | |
javascriptEnabled: <boolean> | |
redactClientLogData: <boolean> # MongoDB Enterprise only | |
sasl: | |
hostName: <string> | |
serviceName: <string> | |
saslauthdSocketPath: <string> | |
enableEncryption: <boolean> # MongoDB Enterprise only | |
encryptionCipherMode: <string> # MongoDB Enterprise only | |
encryptionKeyFile: <string> # MongoDB Enterprise only | |
kmip: # MongoDB Enterprise only | |
keyIdentifier: <string> # MongoDB Enterprise only | |
rotateMasterKey: <boolean> # MongoDB Enterprise only | |
serverName: <string> # MongoDB Enterprise only | |
port: <string> # MongoDB Enterprise only | |
clientCertificateFile: <string> # MongoDB Enterprise only | |
clientCertificatePassword: <string> # MongoDB Enterprise only | |
serverCAFile: <string> # MongoDB Enterprise only | |
ldap: # MongoDB Enterprise only | |
servers: <string> # MongoDB Enterprise only | |
bind: # MongoDB Enterprise only | |
method: <string> # MongoDB Enterprise only | |
saslMechanism: <string> # MongoDB Enterprise only | |
queryUser: <string> # MongoDB Enterprise only | |
queryPassword: <string> # MongoDB Enterprise only | |
useOSDefaults: <boolean> # MongoDB Enterprise + Windows only | |
transportSecurity: <string> # MongoDB Enterprise only | |
timeoutMS: <int> # MongoDB Enterprise only | |
userToDNMapping: <string> # MongoDB Enterprise only | |
authz: # MongoDB Enterprise only | |
queryTemplate: <string> # MongoDB Enterprise only | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#auditlog-options | |
auditLog: # MongoDB Enterprise only | |
destination: <string> # MongoDB Enterprise only | |
format: <string> # MongoDB Enterprise only | |
path: <string> # MongoDB Enterprise only | |
filter: <string> # MongoDB Enterprise only | |
# ==================================================================================== | |
# Options only for mongod: | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#security.authorization | |
security: | |
authorization: <string> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#storage-options | |
storage: | |
dbPath: <string> | |
indexBuildRetry: <boolean> | |
journal: | |
enabled: <boolean> | |
directoryPerDB: <boolean> | |
syncPeriodSecs: <int> | |
engine: <string> | |
wiredTiger: | |
engineConfig: | |
cacheSizeGB: <number> | |
journalCompressor: <string> | |
directoryForIndexes: <boolean> | |
collectionConfig: | |
blockCompressor: <string> | |
indexConfig: | |
prefixCompression: <boolean> | |
inMemory: # MongoDB Enterprise only | |
engineConfig: # MongoDB Enterprise only | |
inMemorySizeGB: <number> # MongoDB Enterprise only | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#operationprofiling-options | |
operationProfiling: | |
slowOpThresholdMs: <int> | |
mode: <string> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#replication-options | |
replication: | |
oplogSizeMB: <int> | |
replSetName: <string> | |
enableMajorityReadConcern: <boolean> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#sharding-options | |
sharding: | |
clusterRole: <string> | |
archiveMovedChunks: <boolean> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#snmp-options | |
snmp: | |
subagent: <boolean> | |
master: <boolean> | |
# ==================================================================================== | |
# Options only for mongos: | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#mongos-only-options | |
replication: | |
localPingThresholdMs: <int> | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/configuration-options/index.html#sharding.configDB | |
sharding: | |
configDB: <string> # <configReplSetName>/cfg1.example.net:27017, cfg2.example.net:27017,... | |
# ==================================================================================== | |
# Server parameters: | |
# ------------------------------------------------------------------------------------ | |
# https://docs.mongodb.com/v3.4/reference/parameters/ | |
setParameter: | |
key: value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment