Example #1
0
 def __init__(self):
     super().__init__()
     self.__logger = Mu.get_logger(Mc.LOGGER_MONITOR_COORDINATOR)
     self.__configs = {}
     self.__os_operator = LinuxOperator()
     self.__heartbeat_flag = False
     self.__heartbeat_interval = Mc.get_heartbeat_check_interval()
     self.__heartbeat_timeout = Mc.get_heartbeat_timeout()
     self.__heartbeat_restart_agent_interval = Mc.get_heartbeat_operation_interval(
     )
     self.__heartbeat_agent_restart_info = {}
    def __init__(self):
        super().__init__()

        self.__db_operator = AlarmOperator.__HANAOperatorService()
        self.__logger = Mu.get_logger(Mc.LOGGER_MONITOR_OPERATOR_ALARM)
        self.__heartbeat_interval = Mc.get_heartbeat_check_interval()
        self.__heartbeat_timeout = Mc.get_heartbeat_timeout()
        self.__heartbeat_email_interval = Mc.get_heartbeat_email_interval()
        self.cpu_threshold = 0
        self.mem_threshold = 0
        self.disk_threshold = 0
        self.email_sender = ""
        self.operation_time = ""
        self.max_failure_times = 3
        self.mem_emergency_threshold = 0
        self.check_interval = 0  # the interval for sending email / performing emergency shutdown
        self.servers = []

        self.__producer = Ku.get_producer()
        self.__topic = Mc.TOPIC_APP_OPERATION
        self.__heartbeat_email_info = {}