Skip to content

Commit

Permalink
[service_discovery][jmx] enable auto-conf for JMX checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
truthbk committed Nov 16, 2016
1 parent b9f8d01 commit 21ac6e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/service_discovery/abstract_config_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,14 @@ def _get_kube_config(self, identifier, kube_annotations):
return None

def _get_auto_config(self, image_name):
from jmxfetch import JMX_CHECKS

ident = self._get_image_ident(image_name)
if ident in self.auto_conf_images:
check_name = self.auto_conf_images[ident]

# get the check class to verify it matches
check = get_check_class(self.agentConfig, check_name)
check = get_check_class(self.agentConfig, check_name) if check_name not in JMX_CHECKS else True
if check is None:
log.info("Could not find an auto configuration template for %s."
" Leaving it unconfigured." % image_name)
Expand Down

0 comments on commit 21ac6e1

Please sign in to comment.