-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Description
Relevant telegraf.conf: 1.9.1
System info:
Ubuntu 14.04
[Include Telegraf version, operating system name, and other relevant details]
Steps to reproduce:
- deploy telegraf on MongoDB mongos server
- 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.]
Reactions are currently unavailable