diff --git a/plugins/inputs/mongodb/README.md b/plugins/inputs/mongodb/README.md index c98736335..545511c92 100644 --- a/plugins/inputs/mongodb/README.md +++ b/plugins/inputs/mongodb/README.md @@ -12,6 +12,10 @@ All MongoDB server versions from 2.6 and higher are supported. ## For example: ## mongodb://user:auth_key@10.10.3.30:27017, ## mongodb://10.10.3.33:18832, + ## + ## If connecting to a cluster, users must include the "?connect=direct" in + ## the URL to ensure that the connection goes directly to the specified node + ## and not have all connections passed to the master node. servers = ["mongodb://127.0.0.1:27017/?connect=direct"] ## When true, collect cluster status. diff --git a/plugins/inputs/mongodb/sample.conf b/plugins/inputs/mongodb/sample.conf index 9b3b0f27d..5e9fbba17 100644 --- a/plugins/inputs/mongodb/sample.conf +++ b/plugins/inputs/mongodb/sample.conf @@ -5,6 +5,10 @@ ## For example: ## mongodb://user:auth_key@10.10.3.30:27017, ## mongodb://10.10.3.33:18832, + ## + ## If connecting to a cluster, users must include the "?connect=direct" in + ## the URL to ensure that the connection goes directly to the specified node + ## and not have all connections passed to the master node. servers = ["mongodb://127.0.0.1:27017/?connect=direct"] ## When true, collect cluster status.