Пример #1
0
 def __init__(self, owner):
     AbstractInfoWidget.__init__(self)
     MonitoringDataDecoder.__init__(self)
     self.owner = owner
     self.data = {}
     self.sign = {}
     self.max_metric_len = 0
Пример #2
0
 def __init__(self, owner):
     AbstractInfoWidget.__init__(self)
     MonitoringDataDecoder.__init__(self)
     self.owner = owner
     self.data = {}
     self.sign = {}
     self.max_metric_len = 0
Пример #3
0
    def __init__(self, autostop, param_str):
        AbstractCriteria.__init__(self)
        MonitoringDataDecoder.__init__(self)

        try:
            self.mon = autostop.core.get_plugin_of_type(MonitoringPlugin)
            self.mon.monitoring.add_listener(self)
        except KeyError:
            self.log.warning("No monitoring module, mon autostop disabled")
        self.triggered = False
        self.autostop = autostop

        self.host = param_str.split(",")[0].strip()
        self.metric = param_str.split(",")[1].strip()
        self.value_limit = float(param_str.split(",")[2])
        self.seconds_limit = tankcore.expand_to_seconds(param_str.split(",")[3])
        self.last_second = None
        self.seconds_count = 0
Пример #4
0
    def __init__(self, autostop, param_str):
        AbstractCriteria.__init__(self)
        MonitoringDataDecoder.__init__(self)

        try:
            self.mon = autostop.core.get_plugin_of_type(MonitoringPlugin)
            self.mon.monitoring.add_listener(self)
        except KeyError:
            self.log.warning("No monitoring module, mon autostop disabled")
        self.triggered = False
        self.autostop = autostop

        self.host = param_str.split(',')[0].strip()
        self.metric = param_str.split(',')[1].strip()
        self.value_limit = float(param_str.split(',')[2])
        self.seconds_limit = tankcore.expand_to_seconds(
            param_str.split(',')[3])
        self.last_second = None
        self.seconds_count = 0