def main(itm_code): try: try: (check_value, detail_msg) = check() except Exception, e: logger.exception(e) exception_msg = "%s" % e api_helper.registerException(itm_code, exception_msg) else:
def main(itm_code): try: try: (check_value, detail_msg, notification_msg) = check() except Exception, e: logger.exception(e) exception_msg = "%s" % e api_helper.registerException(itm_code, exception_msg) else:
def main(itm_code): try: try: (status, detail_msg, notification_msg) = check() except Exception, e: logger.exception(e) exception_msg = "%s" % e api_helper.registerException(itm_code, exception_msg) else:
def main(itm_code): try: try: global state_updater (status, detail_msg) = check() except Exception, e: logger.exception(e) exception_msg = "%s" % e api_helper.registerException(itm_code, exception_msg) else:
def main(itm_code): try: try: global state_updater (status, detail_msg) = check() except Exception, e: logger.exception(e) exception_msg = "%s" % e api_helper.registerException(itm_code, exception_msg) else:
try: global state_updater (status, detail_msg) = check() except Exception, e: logger.exception(e) exception_msg = "%s" % e api_helper.registerException(itm_code, exception_msg) else: # Log capture is aborted, mark as warning status = const.CHECK_STATUS_WARN detail_msg = """On server %s, it is aborted to capture the log file (%s,%s). Then it will cause false alarm when next check.""" % ( app_server, log_folder, file_pattern) logger.info("Check status: %s" % status) logger.info("Check detail message: %s" % detail_msg) api_helper.registerException(itm_code, detail_msg) except Exception, e: logger.exception(e) if __name__ == "__main__": itm_code = "DETECT_THREADSTUCK_IN_LOG_FILE" # configure this check item in your database before run logger.info("=================================") logger.info("===check item: %s" % itm_code) logger.info("=================================") main(itm_code) logger.info("===End to check: %s" % itm_code)
try: try: global state_updater (status, detail_msg) = check() except Exception, e: logger.exception(e) exception_msg = "%s" % e api_helper.registerException(itm_code, exception_msg) else: # Log capture is aborted, mark as warning status = const.CHECK_STATUS_WARN detail_msg = """On server %s, it is aborted to capture the log file (%s,%s). Then it will cause false alarm when next check.""" % (app_server, log_folder, file_pattern) logger.info("Check status: %s" % status) logger.info("Check detail message: %s" % detail_msg) api_helper.registerException(itm_code, detail_msg) except Exception, e: logger.exception(e) if __name__ == "__main__": itm_code = "DETECT_THREADSTUCK_IN_LOG_FILE" # configure this check item in your database before run logger.info("=================================") logger.info("===check item: %s" % itm_code) logger.info("=================================") main(itm_code) logger.info("===End to check: %s" % itm_code)