Beats: [metricbeat] has some problem for shard mongo db

Created on 18 Feb 2019  路  7Comments  路  Source: elastic/beats

For confirmed bugs, please report:

  • Version: metricbeat 6.4.3 6.6.0
  • Operating System: linux
  • Discuss Forum URL:
  • Steps to Reproduce:
    mongo version 3.4.10
    it's shard mongo
    when no shard mongo it is ok, but in shard mongo, the db.stats() command shows like the following, the problem is the data in es has no db name,think that the "db" field is in "raw".

mongos> db.stats()

{
"raw" : {
"s01/localhost:10010,localhost:10020,localhost:10030" : {
"db" : "test",
"collections" : 0,
"objects" : 0,
"avgObjSize" : 0,
"dataSize" : 0,
"storageSize" : 0,
"numExtents" : 0,
"indexes" : 0,
"indexSize" : 0,
"fileSize" : 0,
"nsSizeMB" : 0,
"ok" : 1
}
},
"objects" : 0,
"avgObjSize" : NaN,
"dataSize" : 0,
"storageSize" : 0,
"numExtents" : 0,
"indexes" : 0,
"indexSize" : 0,
"fileSize" : 0,
"ok" : 1
}

Metricbeat Integrations bug module

Most helpful comment

I'm getting similar errors with mongo 4.2 and metricbeat 7.3.2

INFO module/wrapper.go:247 Error fetching data for metricset mongodb.metrics: failed to apply schema: 8 errors: key metrics.storage.freelist not found; key metrics.repl.preload not found; key metrics.repl.executor.counters not found; key metrics.repl.executor.queues.ready not found; key metrics.repl.executor.queues.free not found; key metrics.repl.executor.queues.exclusiveInProgress not found; key metrics.repl.executor.queues.dbWorkInProgress not found; key metrics.repl.executor.eventWaiters not found

All 7 comments

Not sure is my issue related, but I'm using 4.x version and also sharded setup. And plugin does not work.
maybe 4.x is not supported, maybe because of sharding.

Hi @evilezh I have just setup a cluster with mongo 4 with 3 config servers, a replica set with 3 shards and 2 mongos (total 8 nodes) and everything worked as expected in 6.6 and 7.0. Can you give some details about the errors you were getting? db names were expected and correct in the output events

Closing this as we haven't received news in a month. Feel free to reopen :slightly_smiling_face:

Hi @sayden
I have a similar v4.0.11 sharded cluster setup, 3 mongod nodes, 3 mongoc nodes and 3 mongos servers, I monitor 3 mongod instances with metricbeat

In "metrics" metricset there is always an error:

]failed to apply schema: 6 errors: key `metrics.repl.executor.counters` not found; key `metrics.repl.executor.queues.ready` not found; key `metrics.repl.executor.queues.free` not found; key `metrics.repl.executor.queues.dbWorkInProgress` not found; key `metrics.repl.executor.queues.exclusiveInProgress` not found; key `metrics.repl.executor.eventWaiters` not found`

I checked the output by running db.runCommand({serverStatus: 1}) directly on one of mongod nodes and there is no such keys, here is the repl.executor from mongod output:

"repl" : {
            "executor" : {
                "pool" : {
                    "inProgressCount" : 0
                },
                "queues" : {
                    "networkInProgress" : 0,
                    "sleepers" : 3
                },
                "unsignaledEvents" : 0,
                "shuttingDown" : false,
                "networkInterface" : "DEPRECATED: getDiagnosticString is deprecated in NetworkInterfaceTL"
            },
....

Other metricbeat metricsets work like a charm
Is there anything I can do with that?

Thanks in advance

I'm getting similar errors with mongo 4.2 and metricbeat 7.3.2

INFO module/wrapper.go:247 Error fetching data for metricset mongodb.metrics: failed to apply schema: 8 errors: key metrics.storage.freelist not found; key metrics.repl.preload not found; key metrics.repl.executor.counters not found; key metrics.repl.executor.queues.ready not found; key metrics.repl.executor.queues.free not found; key metrics.repl.executor.queues.exclusiveInProgress not found; key metrics.repl.executor.queues.dbWorkInProgress not found; key metrics.repl.executor.eventWaiters not found

I'm getting similar errors with mongo 4.2 and metricbeat 7.3.2

INFO module/wrapper.go:247 Error fetching data for metricset mongodb.metrics: failed to apply schema: 8 errors: key metrics.storage.freelist not found; key metrics.repl.preload not found; key metrics.repl.executor.counters not found; key metrics.repl.executor.queues.ready not found; key metrics.repl.executor.queues.free not found; key metrics.repl.executor.queues.exclusiveInProgress not found; key metrics.repl.executor.queues.dbWorkInProgress not found; key metrics.repl.executor.eventWaiters not found

same error here

I have opened a PR for fixing this: https://github.com/elastic/beats/pull/14143

Was this page helpful?
0 / 5 - 0 ratings