diff --git a/checks.d/mysql.py b/checks.d/mysql.py index be94bfd8d1..9296a43533 100644 --- a/checks.d/mysql.py +++ b/checks.d/mysql.py @@ -529,7 +529,13 @@ def _collect_metrics(self, host, db, tags, options, queries): if _is_affirmative(options.get('replication', False)): # Get replica stats results.update(self._get_replica_stats(db)) - results.update(self._get_slave_status(db)) + performance_schema_enabled = self._get_variable_enabled(results, 'performance_schema') + + if _is_affirmative(options.get('extra_performance_metrics', False)) and \ + self._version_compatible(db, host, "5.6.0") and \ + performance_schema_enabled: + results.update(self._get_slave_status(db)) + metrics.update(REPLICA_VARS) # get slave running form global status page