Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get metrics over discovered replica/shards in cluster nodes #3

Open
flaviostutz opened this issue Sep 17, 2020 · 1 comment
Open

Get metrics over discovered replica/shards in cluster nodes #3

flaviostutz opened this issue Sep 17, 2020 · 1 comment

Comments

@flaviostutz
Copy link
Contributor

flaviostutz commented Sep 17, 2020

One idea is to use mongostat for helping on this

mongostat --username admin --password edidatico!dmin#123 --authenticationDatabase=admin --discover --uri=mongodb://localhost

       host insert query update delete getmore command dirty  used flushes mapped vsize   res faults qrw arw net_in net_out conn    set repl                time

localhost:27017 *0 *0 *0 *0 0 7|0 0 0B 2.07G 362M 0 0|0 0|0 1.31k 17.4k 457 RTR Sep 17 08:16:16.712
shard1a:27017 *0 *0 *0 *0 0 8|0 0.2% 75.8% 0 3.19G 1.58G n/a 0|0 1|0 2.12k 49.7k 52 shard1 PRI Sep 17 08:16:15.780
shard1b:27017 *0 *0 *0 *0 0 5|0 0.2% 55.3% 0 2.88G 1.47G n/a 0|0 1|0 848b 46.8k 43 shard1 SEC Sep 17 08:16:15.812
shard1c:27017 *0 *0 *0 *0 0 3|0 1.3% 63.0% 0 2.95G 1.51G n/a 0|0 1|0 570b 46.1k 46 shard1 SEC Sep 17 08:16:15.844
shard2a:27017 *0 *0 *0 *0 0 4|0 0.4% 79.4% 0 3.32G 1.70G n/a 0|0 1|0 1.36k 46.0k 52 shard2 PRI Sep 17 08:16:15.893
shard2b:27017 *0 *0 *0 *0 0 8|0 0.0% 72.4% 0 3.07G 1.58G n/a 0|0 1|0 1.53k 50.6k 46 shard2 SEC Sep 17 08:16:15.921
shard2c:27017 *0 *0 *0 *0 0 7|0 0.5% 63.1% 0 2.89G 1.46G n/a 0|0 1|0 1.13k 48.9k 44 shard2 SEC Sep 17 08:16:15.984
shard3a:27017 *0 *0 *0 *0 0 6|0 0.6% 74.3% 0 3.09G 1.57G n/a 0|0 1|0 1.65k 47.6k 51 shard3 PRI Sep 17 08:16:16.035
shard3b:27017 *0 *0 *0 *0 0 5|0 0.6% 41.0% 0 2.95G 1.45G n/a 0|0 1|0 698b 46.3k 46 shard3 SEC Sep 17 08:16:16.068
shard3c:27017 *0 *0 *0 *0 0 4|0 0.1% 35.8% 0 2.85G 1.43G n/a 0|0 1|0 696b 46.2k 44 shard3 SEC Sep 17 08:16:16.113

@flaviostutz
Copy link
Contributor Author

With mongostat you can get various metrics from all nodes like "mongostat -o='host,mem.bits,metrics.document.inserted.diff()=inserted diff,metrics.document.inserted=inserted' --rowcount=5"

https://docs.mongodb.com/manual/reference/command/serverStatus/#serverstatus.metrics.document.inserted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant