Close db connection in mysql check

Mysql log gets an "Aborted connection" warning every 30sec
because the connection is not being closed properly.

Story: 2007233
Task: 38509
Change-Id: Ied6c19f8f7ac9b81f61b84efa2f6c7a8e40c3056
This commit is contained in:
Darragh O'Reilly 2020-01-30 12:25:30 +00:00
parent ebd42eb5de
commit 1caaf4423a

View File

@ -101,6 +101,7 @@ class MySql(checks.AgentCheck):
# Metric collection
self._collect_metrics(host, db, dimensions, options)
self._collect_system_metrics(host, db, dimensions)
db.close()
@staticmethod
def _get_config(instance):