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

[metricbeat] has some problem for shard mongo db #10793

Closed
wanyongx opened this issue Feb 18, 2019 · 7 comments
Closed

[metricbeat] has some problem for shard mongo db #10793

wanyongx opened this issue Feb 18, 2019 · 7 comments
Assignees
Labels
bug Metricbeat Metricbeat module Team:Integrations Label for the Integrations team

Comments

@wanyongx
Copy link

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
    }
@wanyongx wanyongx changed the title metricbeat has some problem for shard mongo db [metricbeat] has some problem for shard mongo db Feb 18, 2019
@jsoriano jsoriano added bug module Metricbeat Metricbeat Team:Integrations Label for the Integrations team labels Feb 19, 2019
@evilezh
Copy link

evilezh commented Apr 3, 2019

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.

@sayden
Copy link
Contributor

sayden commented Apr 25, 2019

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

@sayden
Copy link
Contributor

sayden commented May 29, 2019

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

@AndreySlashman
Copy link

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

@gdanov
Copy link

gdanov commented Sep 18, 2019

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

@hamidinfotech
Copy link

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

@kaiyan-sheng
Copy link
Contributor

I have opened a PR for fixing this: #14143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Metricbeat Metricbeat module Team:Integrations Label for the Integrations team
Projects
None yet
Development

No branches or pull requests

10 participants