Hi, i have been trying to monitor a 3 replica set cluster using Telegraf.
The documentation does not makes it extra clear how to connect to the cluster.
Should I only give my mongos (router) URL in the telegraf config? like
servers = [ "mongodb://MyClusterMonitor:password@mongo-router:27017/?directConnection=true", ]
In this case, i get a Failed to gather data: failed running admin cmd: (CommandNotFound) no such cmd: top
error.
Should i connect to all my mongod instances ?
servers = [ "mongodb://MyClusterMonitor:password@mongo-1-1:27017/?directConnection=true", "mongodb://MyClusterMonitor:password@mongo-1-2:27017/?directConnection=true", "mongodb://MyClusterMonitor:password@mongo-1-3:27017/?directConnection=true", "mongodb://MyClusterMonitor:password@mongo-2-1:27017/?directConnection=true", ... ]
Not sure what the mongo user configuration and mongo input plugin should be.
Thank you for your help