Skip to content

Problem with MongoDB plug-in #5326

@SteveH-US

Description

@SteveH-US

Relevant telegraf.conf: 1.9.1

System info:

Ubuntu 14.04

[Include Telegraf version, operating system name, and other relevant details]

Steps to reproduce:

  1. deploy telegraf on MongoDB mongos server
  2. observe results

Expected behavior:

"mongodb_shard_stats" measurement populated

Actual behavior:

The following error is produced

2019-01-22T17:26:40Z E! Error getting first oplog entry (Can't use 'local' database through mongos)

and no metrics are posted

Additional info:

I think I found a problem reviewing the code. The same "gatherMetrics" method attempts to get oplog details from "local.oplog.rs" collection and chunk details from the "chunk" collection. The only part of a sharded MongoDB cluster that has replicaset details and "chunk" details is the config replica set. However, the metrics produced by the config server are not representative of the load being put on the sharded cluster, which is going through the mongos and the shards.

Please advise. What am I missing?

[Include gist of relevant config, logs, etc.]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions