Skip to content

Commit a21575f

Browse files
authored
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.
1 parent 28a507e commit a21575f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

REFERENCE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
| --[no-]discovering-mode | Enable autodiscover collections | |
99
| --mongodb.collstats-colls | List of comma separared databases.collections to get $collStats | --mongodb.collstats-colls=db1,db2.col2 |
1010
| --mongodb.indexstats-colls | List of comma separared databases.collections to get $indexStats | --mongodb.indexstats-colls=db1.col1,db2.col2 |
11-
| --[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 | |
11+
| --[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 | |
1212
| --[no-]mongodb.global-conn-pool | Use global connection pool instead of creating new pool for each http request | |
1313
| --mongodb.uri | MongoDB connection URI ($MONGODB_URI) | --mongodb.uri=mongodb://user:pass@127.0.0.1:27017/admin?ssl=true |
14-
| --split-cluster | Whether to treat cluster members from the connection URI as separate targets |
14+
| --split-cluster | Whether to treat cluster members from the connection URI as separate targets, use with `--mongodb.direct-connect` and the `/scrapeall` endpoint | |
1515
| --web.listen-address | Address to listen on for web interface and telemetry | --web.listen-address=":9216" |
1616
| --web.telemetry-path | Metrics expose path | --web.telemetry-path="/metrics" |
1717
| --web.config | Path to the file having Prometheus TLS config for basic auth | --web.config=STRING |

0 commit comments

Comments
 (0)