def get_auto_conf(agentConfig, check_name):
 from config import PathNotFound, get_auto_confd_path
 try:
  auto_confd_path = get_auto_confd_path()
 except PathNotFound:
  log.error("Couldn't find the check auto-configuration folder, no auto configuration will be used.")
  return None
 auto_conf_path = os.path.join(auto_confd_path, ('%s.yaml' % check_name))
 if (not os.path.exists(auto_conf_path)):
  log.error(("Couldn't find any auto configuration file for the %s check." % check_name))
  return None
 try:
  auto_conf = check_yaml(auto_conf_path)
 except Exception as e:
  log.error(('Enable to load the auto-config, yaml file.Auto-config will not work for this check.\n%s' % str(e)))
  return None
 return auto_conf

def get_auto_conf ( agentConfig , check_name ) : from config import PathNotFound , get_auto_confd_path try : auto_confd_path = get_auto_confd_path ( ) except PathNotFound : log . error ( "Couldn't find the check auto-configuration folder, no auto configuration will be used." ) return None auto_conf_path = os . path . join ( auto_confd_path , ( '%s.yaml' % check_name ) ) if ( not os . path . exists ( auto_conf_path ) ) : log . error ( ( "Couldn't find any auto configuration file for the %s check." % check_name ) ) return None try : auto_conf = check_yaml ( auto_conf_path ) except Exception as e : log . error ( ( 'Enable to load the auto-config, yaml file.Auto-config will not work for this check.\n%s' % str ( e ) ) ) return None return auto_conf
return the yaml auto_config dict for a check name .