From a21575fb9a9044a7ecec7fb555ca50480ae65009 Mon Sep 17 00:00:00 2001 From: Dobes Vandermeer Date: Thu, 7 Aug 2025 12:49:13 -0700 Subject: [PATCH] Note use of direct conneciton with `--split-cluser` I found that when using `--split-cluster` you should also use direct connections, otherwise it just only connects to the same replica and reports its metrics as if all the replicas have exactly the same metric values. --- REFERENCE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 83cda4f91..c2a281771 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -8,10 +8,10 @@ | --[no-]discovering-mode | Enable autodiscover collections | | | --mongodb.collstats-colls | List of comma separared databases.collections to get $collStats | --mongodb.collstats-colls=db1,db2.col2 | | --mongodb.indexstats-colls | List of comma separared databases.collections to get $indexStats | --mongodb.indexstats-colls=db1.col1,db2.col2 | -| --[no-]mongodb.direct-connect | Whether or not a direct connect should be made. Direct connections are not valid if multiple hosts are specified or an SRV URI is used | | +| --[no-]mongodb.direct-connect | Whether or not a direct connect should be made. Direct connections are not valid if multiple hosts are specified or an SRV URI is used unless using --split-cluster | | | --[no-]mongodb.global-conn-pool | Use global connection pool instead of creating new pool for each http request | | | --mongodb.uri | MongoDB connection URI ($MONGODB_URI) | --mongodb.uri=mongodb://user:pass@127.0.0.1:27017/admin?ssl=true | -| --split-cluster | Whether to treat cluster members from the connection URI as separate targets | +| --split-cluster | Whether to treat cluster members from the connection URI as separate targets, use with `--mongodb.direct-connect` and the `/scrapeall` endpoint | | | --web.listen-address | Address to listen on for web interface and telemetry | --web.listen-address=":9216" | | --web.telemetry-path | Metrics expose path | --web.telemetry-path="/metrics" | | --web.config | Path to the file having Prometheus TLS config for basic auth | --web.config=STRING |