From a45410368dd293e100de85dd7c78fa4846969d7d Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Thu, 16 Jun 2022 09:43:26 -0600 Subject: [PATCH] docs: explain directly connecting to mongo node (#11314) --- plugins/inputs/mongodb/README.md | 4 ++++ plugins/inputs/mongodb/sample.conf | 4 ++++ 2 files changed, 8 insertions(+) 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.