mongodb_exporter icon indicating copy to clipboard operation
mongodb_exporter copied to clipboard

adjusting to 20.x metrics

Open ghost opened this issue 3 years ago • 8 comments

So I've noted a few of the changes that we'll need to make in our Grafana dashboards, but there's a few around collections that I can't seem to find. e.g. mongodb_mongod_db_collections_total{db="admin"}. I've tried running with --compatible-mode and --discovering-mode but ctrl-f'ing admin shows no results. Is there a way to get these metrics still or have they been removed?

ghost avatar May 19 '21 09:05 ghost

Have you got metrics mongodb_mongos_db_collections_total ?

adivinho avatar May 19 '21 11:05 adivinho

MongoDB Server = 4.2.11 Exporter = 20.5 --discovering-mode --compatible-mode Only metrics with collections in the name is mongodb_ss_metrics_commands_listCollections_failed, mongodb_ss_metrics_commands_listCollections_total, mongodb_ss_metrics_commands_mergeAuthzCollections_failed and mongodb_ss_metrics_commands_mergeAuthzCollections_total

ghost avatar May 19 '21 12:05 ghost

Sorry I couldn't make it to that meeting, but did you manage to discuss any of this ticket? Have collection metrics been dropped?

ghost avatar May 26 '21 08:05 ghost

I am running with --compatible-mode but I do not see any mongodb_mongos_ metrics at all either

khuongduybui avatar Jun 02 '21 18:06 khuongduybui

I couldn't find an equivalent for mongodb_mongod_db_collections_total on replica sets either. Any updates on this?

alin-grecu avatar Jun 07 '21 11:06 alin-grecu

Same issue here

dgdevops avatar Jun 07 '21 15:06 dgdevops

Are there any plans to reintroduce these metrics?

dgdevops avatar Jun 14 '21 11:06 dgdevops

There is an error when connecting to mongos. A quick check returns this error

mongo 127.0.0.1:17000
MongoDB shell version v4.4.7
connecting to: mongodb://127.0.0.1:17000/test?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("02f2280b-bf92-4b72-80e6-020fba128cdc") }
MongoDB server version: 4.2.15
WARNING: shell and server versions do not match
---
The server generated these startup warnings when booting:
2021-07-22T12:44:28.268+0000 I  CONTROL  [main]
2021-07-22T12:44:28.268+0000 I  CONTROL  [main] ** WARNING: Access control is not enabled for the database.
2021-07-22T12:44:28.268+0000 I  CONTROL  [main] **          Read and write access to data and configuration is unrestricted.
2021-07-22T12:44:28.268+0000 I  CONTROL  [main]
---
mongos> show databases;
uncaught exception: Error: listDatabases failed:{
        "ok" : 0,
        "errmsg" : "Could not find host matching read preference { mode: \"primary\" } for set rs1",
        "code" : 133,
        "codeName" : "FailedToSatisfyReadPreference",
        "operationTime" : Timestamp(1627207810, 1),
        "$clusterTime" : {
                "clusterTime" : Timestamp(1627207810, 1),
                "signature" : {
                        "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                        "keyId" : NumberLong(0)
                }
        }
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
Mongo.prototype.getDBs/<@src/mongo/shell/mongo.js:147:19
Mongo.prototype.getDBs@src/mongo/shell/mongo.js:99:12
shellHelper.show@src/mongo/shell/utils.js:937:13
shellHelper@src/mongo/shell/utils.js:819:15

I've created PMM-8491 to track this issue.

Thanks for the report.

percona-csalguero avatar Jul 25 '21 10:07 percona-csalguero