Closed
Description
Each of the MongoDB metricsets (status, dbstats) create a new session for each Fetch
by do not close the session that they open. Each metricset should have a defer session.Close()
(or similar).
For confirmed bugs, please report:
- Version: 5.x / 6.x
- Operating System: all
- Discuss: https://discuss.elastic.co/t/metricbeat-mongodb-leaks-connections-when-metricbeat-config-modules-reload-enabled-set-to-true/108723?u=andrewkroh
- Steps to Reproduce: Enable the mongodb module.