pass
except AttributeError as e:
self._stop(job)
- msg.error(job.chart_name, "cannot find check() function.")
+ msg.error(job.chart_name, "cannot find check() function or it thrown unhandled exception.")
msg.debug(str(e))
except (UnboundLocalError, Exception) as e:
msg.error(job.chart_name, str(e))
# sys.stdout.flush()
i += 1
except AttributeError:
- msg.error(job.chart_name, "cannot find create() function.")
+ msg.error(job.chart_name, "cannot find create() function or it thrown unhandled exception.")
self._stop(job)
except (UnboundLocalError, Exception) as e:
msg.error(job.chart_name, str(e))
DEBUG_FLAG = conf['debug']
except (KeyError, TypeError):
pass
+ try:
+ log_counter = conf['logs_per_interval']
+ except (KeyError, TypeError):
+ log_counter = 200
+ try:
+ log_interval = conf['log_interval']
+ except (KeyError, TypeError):
+ log_interval = 3600
for k, v in conf.items():
if k in ("update_every", "debug", "enabled"):
continue
# parse passed command line arguments
modules = parse_cmdline(MODULES_DIR, *sys.argv)
msg.DEBUG_FLAG = DEBUG_FLAG
+ msg.LOG_COUNTER = log_counter
+ msg.LOG_INTERVAL = log_interval
msg.info("MODULES_DIR='" + MODULES_DIR +
"', CONFIG_DIR='" + CONFIG_DIR +
"', UPDATE_EVERY=" + str(BASE_CONFIG['update_every']) +