def __init__(self, name, init_config, agentConfig, instances):
        AgentCheck.__init__(self, name, init_config, agentConfig, instances)

        # A dictionary to keep track of service statuses
        self.statuses = {}
        self.notified = {}
        self.nb_failures = 0
        self.pool_started = False
Exemple #2
0
    def __init__(self, name, init_config, agent_config):
        AgentCheck.__init__(self, name, init_config, agent_config)

        # Load any custom metrics from conf.d/sqlserver.yaml
        for row in init_config.get('custom_metrics', []):
            if row['type'] not in VALID_METRIC_TYPES:
                self.log.error('%s has an invalid metric type: %s' % (row['name'], row['type']))
            self.METRICS.append((row['name'], row['type'], row['counter_name'],
                                 row.get('instance_name', ''), row.get('tag_by', None)))

        # Cache connections
        self.connections = {}
Exemple #3
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self.dbs = {}
     self.versions = {}
Exemple #4
0
    def __init__(self, name, init_config, agent_config):
        AgentCheck.__init__(self, name, init_config, agent_config)

        # Host status needs to persist across all checks
        self.host_status = defaultdict(lambda: defaultdict(lambda: None))
Exemple #5
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self.high_watermarks = {}
Exemple #6
0
 def __init__(self, name, init_config, agent_config, instances=None):
     AgentCheck.__init__(self, name, init_config, agent_config, instances)
     self.assumed_url = {}
Exemple #7
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self.wmi_conns = {}
Exemple #8
0
    def __init__(self, name, init_config, agent_config):
        AgentCheck.__init__(self, name, init_config, agent_config)

        # Host status needs to persist across all checks
        self.cluster_status = {}
Exemple #9
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self.last_ts = {}
Exemple #10
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self._last_state_by_server = {}
Exemple #11
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self._last_state_by_server = {}
Exemple #12
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self.connections = {}
Exemple #13
0
 def __init__(self, name, init_config, agent_config, instances=None):
     AgentCheck.__init__(self, name, init_config, agent_config, instances=instances)
     if instances is not None and len(instances) > 1:
         raise Exception("Network check only supports one configured instance.")
Exemple #14
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self.connections = {}
Exemple #15
0
    def __init__(self, name, init_config, agent_config):
        AgentCheck.__init__(self, name, init_config, agent_config)

        # Host status needs to persist across all checks
        self.host_status = defaultdict(lambda: defaultdict(lambda: None))
Exemple #16
0
 def __init__(self, name, init_config, agent_config, instances=None):
     AgentCheck.__init__(self, name, init_config, agent_config, instances)
     self.already_alerted = []
Exemple #17
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self.instance_cache_file = "{}/{}".format(
         self.init_config.get('cache_dir'), 'libvirt_instances.yaml')
     self.metric_cache_file = "{}/{}".format(
         self.init_config.get('cache_dir'), 'libvirt_metrics.yaml')
 def __init__(self, name, init_config, agent_config, instances=None):
     AgentCheck.__init__(self, name, init_config, agent_config, instances)
     self.already_alerted = []
Exemple #19
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self.instance_cache_file = "{}/{}".format(self.init_config.get('cache_dir'),
                                               'libvirt_instances.yaml')
     self.metric_cache_file = "{}/{}".format(self.init_config.get('cache_dir'),
                                             'libvirt_metrics.yaml')
Exemple #20
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self.wmi_conns = {}
Exemple #21
0
 def __init__(self, name, init_config, agent_config, instances=None):
     AgentCheck.__init__(self, name, init_config, agent_config, instances=instances)
     if instances is not None and len(instances) > 1:
         raise Exception("Network check only supports one configured instance.")
Exemple #22
0
    def __init__(self, name, init_config, agent_config):
        AgentCheck.__init__(self, name, init_config, agent_config)

        # Host status needs to persist across all checks
        self.cluster_status = {}
Exemple #23
0
    def __init__(self, name, init_config, agent_config, instances=None):
        AgentCheck.__init__(self, name, init_config, agent_config, instances)
        for k in ["mean", "median", "95", "99", "100"]:
            [self.keys.append(m + "_" + k) for m in self.stat_keys]

        self.prev_coord_redirs_total = -1
Exemple #24
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self.mysql_version = {}
     self.greater_502 = {}
Exemple #25
0
    def __init__(self, name, init_config, agent_config, instances=None):
        AgentCheck.__init__(self, name, init_config, agent_config, instances)
        for k in ["mean", "median", "95", "99", "100"]:
            [self.keys.append(m + "_" + k) for m in self.stat_keys]

        self.prev_coord_redirs_total = -1
Exemple #26
0
 def __init__(self, name, init_config, agent_config, instances=None):
     AgentCheck.__init__(self, name, init_config, agent_config, instances)
     self.assumed_url = {}
Exemple #27
0
 def __init__(self, name, init_config, agent_config):
     AgentCheck.__init__(self, name, init_config, agent_config)
     self.dbs = {}
     self.versions = {}