beats
beats copied to clipboard
MongoDB metricsets incorrectly handling multiple hosts
Metricsets of the MongoDB module are doing their own parsing of the hosts setting (here), and using the result to configure the MongoDB client (here).
Usually, hosts parsing is done by the module, and individual metricsets should use the host data in the base metric set. This was also being done in this module at least till 8.2 (here).
The new approach produces failures when multiple hosts are used:
fetching data for metricset mongodb.dbstats: could not create mongodb client: could not create mongodb client: a direct connection cannot be made if multiple hosts are specified
For confirmed bugs, please report:
- Version: 8.3
- Operating System: Probably all.
- Discuss Forum URL: https://discuss.elastic.co/t/failed-to-monitor-mongo-cluster/308453
- Steps to Reproduce: Use the MongoDB Metricbeat module with multiple hosts.