def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host', '127.0.0.1')
     self.port = self.configuration.get('port', 15672)
     self.scheme = self.configuration.get('scheme', 'http')
Beispiel #2
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get(
         'url', "http://127.0.0.1:8080/manager/status?XML=true")
     self.connector_name = self.configuration.get('connector_name', None)
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #3
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.baseurl = self.configuration.get('url', 'http://localhost:5001')
     self.do_pinapi = self.configuration.get('pinapi')
     self.__storage_max = None
Beispiel #4
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host', '127.0.0.1')
     self.port = self.configuration.get('port', 9181)
     self.scheme = self.configuration.get('scheme', 'http')
Beispiel #5
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.url = self.configuration.get('url', 'http://127.0.0.1:19999/api/v1/alarms?all')
     self.status_map = self.configuration.get('status_map', DEFAULT_STATUS_MAP)
     self.chart_title = f"Alarms ({', '.join([f'{k}={self.status_map[k]}' for k in self.status_map])})"
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.url = self.configuration.get(
         'url', 'http://localhost:8080/colibri/stats')
     self.keys = [l[0] for i in CHARTS.values() for l in i['lines']]
Beispiel #7
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.api_host = self.configuration.get('api_host')
     self.api_port = self.configuration.get('api_port', 9600)
     self.device_host = self.configuration.get('device_host')
     self.device_port = self.configuration.get('device_port')
     self.username = self.configuration.get('username', 'admin')
     self.password = self.configuration.get('password')
     self.channels = self.configuration.get('channels')
     self.url = '{scheme}://{host}:{port}'.format(
         scheme=self.configuration.get('scheme', 'http'),
         host=self.api_host,
         port=self.api_port)
     self.methods = [
         METHODS(
             get_data=self._get_node_stats,
             url=self.url +
             '/api/check?host={host}&port={port}&username={user}&password={password}&channels={channels}'
             .format(host=self.device_host,
                     port=self.device_port,
                     user=self.username,
                     password=self.password,
                     channels=self.channels),
             run=self.configuration.get('node_stats', True))
     ]
Beispiel #8
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     base_url = self.configuration.get('url', "http://localhost:2812")
     self.url = '{0}/_status?format=xml&level=full'.format(base_url)
     self.active_services = list()
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     pattern = self.configuration.get('regex')
     self.regex = re.compile(pattern) if pattern else None
     self.status_codes_accepted = self.configuration.get('status_accepted', [200])
     self.follow_redirect = self.configuration.get('redirect', True)
Beispiel #10
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url', 'http://127.0.0.1:8114')
     self.header = {
         'Content-Type': 'application/json',
     }
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #11
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url', 'http://localhost/api.php')
     self.order = ORDER
     self.definitions = CHARTS
     self.blocks_old = 0  #block count previous poll
     self.tps_old = deque(
         [0] * 50)  #tps history last 50 polls, init with 50 zeroes
Beispiel #12
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.user = self.configuration.get('user')
     self.password = self.configuration.get('pass')
     self.url = self.configuration.get(
         'url', 'http://localhost'
     ) + '/ocs/v2.php/apps/serverinfo/api/v1/info?format=json'
Beispiel #13
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url', 'http://localhost/status?full&json')
     self.order = ORDER
     self.definitions = CHARTS
     self.regex = re.compile(r'([a-z][a-z ]+): ([\d.]+)')
     self.json = '&json' in self.url or '?json' in self.url
     self.json_full = self.url.endswith(('?full&json', '?json&full'))
     self.if_all_processes_running = dict([(c_name + p_name, 0) for c_name, func in CALC
                                           for metric, p_name in PER_PROCESS_INFO])
Beispiel #14
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.sm = self.configuration.get('status_map', DEFAULT_STATUS_MAP)
     self.alarm_status_chart_type = self.configuration.get('alarm_status_chart_type', DEFAULT_ALARM_STATUS_CHART_TYPE)
     self.order, self.definitions = charts_template(self.sm, self.alarm_status_chart_type)
     self.url = self.configuration.get('url', DEFAULT_URL)
     self.collect_alarm_values = bool(self.configuration.get('collect_alarm_values', DEFAULT_COLLECT_ALARM_VALUES))
     self.collected_dims = {'alarms': set(), 'values': set()}
     self.alarm_contains_words = self.configuration.get('alarm_contains_words', DEFAULT_ALARM_CONTAINS_WORDS)
     self.alarm_contains_words_list = [alarm_contains_word.lstrip(' ').rstrip(' ') for alarm_contains_word in self.alarm_contains_words.split(',')]
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.url = '{0}://{1}:{2}'.format(
         configuration.get('scheme', 'http'),
         configuration.get('host', '127.0.0.1'),
         configuration.get('port', 15672),
     )
     self.node_name = str()
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url', 'http://localhost/status?full&json')
     self.order = ORDER
     self.definitions = CHARTS
     self.regex = re.compile(r'([a-z][a-z ]+): ([\d.]+)')
     self.json = '&json' in self.url or '?json' in self.url
     self.json_full = self.url.endswith(('?full&json', '?json&full'))
     self.if_all_processes_running = dict([(c_name + p_name, 0) for c_name, func in CALC
                                           for metric, p_name in PER_PROCESS_INFO])
Beispiel #17
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host')
     self.port = self.configuration.get('port', 9200)
     self.url = '{scheme}://{host}:{port}'.format(scheme=self.configuration.get('scheme', 'http'),
                                                  host=self.host,
                                                  port=self.port)
     self.latency = dict()
     self.methods = list()
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host')
     self.port = self.configuration.get('port', 9200)
     self.url = '{scheme}://{host}:{port}'.format(scheme=self.configuration.get('scheme', 'http'),
                                                  host=self.host,
                                                  port=self.port)
     self.latency = dict()
     self.methods = list()
Beispiel #19
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host')
     self.port = self.configuration.get('port', 9600)
     self.url = '{scheme}://{host}:{port}'.format(scheme=self.configuration.get('scheme', 'http'),
                                                  host=self.host,
                                                  port=self.port)
     self.methods = [METHODS(get_data=self._get_node_stats,
                             url=self.url + '/_node/stats/jvm?pretty',
                             run=self.configuration.get('node_stats', True))]
Beispiel #20
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.sm = self.configuration.get('status_map', DEFAULT_STATUS_MAP)
     self.alarm_status_chart_type = self.configuration.get(
         'alarm_status_chart_type', DEFAULT_ALARM_STATUS_CHART_TYPE)
     self.order, self.definitions = charts_template(
         self.sm, self.alarm_status_chart_type)
     self.url = self.configuration.get('url', DEFAULT_URL)
     self.collect_alarm_values = bool(
         self.configuration.get('collect_alarm_values',
                                DEFAULT_COLLECT_ALARM_VALUES))
     self.collected_dims = {'alarms': set(), 'values': set()}
Beispiel #21
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url', 'http://localhost:8080/health')
     self.order = ORDER
     self.definitions = CHARTS
     self.data = {
         'successful_requests': 0, 'redirects': 0, 'bad_requests': 0,
         'server_errors': 0, 'other_requests': 0, '1xx': 0, '2xx': 0,
         '3xx': 0, '4xx': 0, '5xx': 0, 'other': 0,
         'average_response_time_per_iteration_sec': 0
     }
     self.last_total_response_time = 0
     self.last_total_count = 0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url', 'http://localhost:8080/health')
     self.order = ORDER
     self.definitions = CHARTS
     self.data = {
         'successful_requests': 0, 'redirects': 0, 'bad_requests': 0,
         'server_errors': 0, 'other_requests': 0, '1xx': 0, '2xx': 0,
         '3xx': 0, '4xx': 0, '5xx': 0, 'other': 0,
         'average_response_time_per_iteration_sec': 0
     }
     self.last_total_response_time = 0
     self.last_total_count = 0
Beispiel #23
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host', '127.0.0.1')
     self.port = self.configuration.get('port', 5984)
     self.node = self.configuration.get('node', '[email protected]')
     self.scheme = self.configuration.get('scheme', 'http')
     self.user = self.configuration.get('user')
     self.password = self.configuration.get('pass')
     try:
         self.dbs = self.configuration.get('databases').split(' ')
     except (KeyError, AttributeError):
         self.dbs = list()
Beispiel #24
0
    def __init__(self, configuration=None, name=None):
        UrlService.__init__(self, configuration=configuration, name=name)
        # if memstats collection is enabled, add the charts and their order
        if self.configuration.get('collect_memstats'):
            self.definitions = dict(MEMSTATS_CHARTS)
            self.order = list(MEMSTATS_ORDER)
        else:
            self.definitions = dict()
            self.order = list()

        # if extra charts are defined, parse their config
        extra_charts = self.configuration.get('extra_charts')
        if extra_charts:
            self._parse_extra_charts_config(extra_charts)
Beispiel #25
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host', '127.0.0.1')
     self.port = self.configuration.get('port', 5984)
     self.node = self.configuration.get('node', '[email protected]')
     self.scheme = self.configuration.get('scheme', 'http')
     self.user = self.configuration.get('user')
     self.password = self.configuration.get('pass')
     try:
         self.dbs = self.configuration.get('databases').split(' ')
     except (KeyError, AttributeError):
         self.dbs = []
Beispiel #26
0
    def __init__(self, configuration=None, name=None):
        UrlService.__init__(self, configuration=configuration, name=name)
        # if memstats collection is enabled, add the charts and their order
        if self.configuration.get('collect_memstats'):
            self.definitions = dict(MEMSTATS_CHARTS)
            self.order = list(MEMSTATS_ORDER)
        else:
            self.definitions = dict()
            self.order = list()

        # if extra charts are defined, parse their config
        extra_charts = self.configuration.get('extra_charts')
        if extra_charts:
            self._parse_extra_charts_config(extra_charts)
Beispiel #27
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host', '127.0.0.1')
     self.port = self.configuration.get('port', 9796)
     self.url = '{scheme}://{host}:{port}'.format(
         scheme=self.configuration.get('scheme', 'http'),
         host=self.host,
         port=self.port,
     )
     self.method = 'POST'
     self.header = {
         'Content-Type': 'application/json',
     }
Beispiel #28
0
 def __init__(self, configuration=None, name=None):
     if 'socket' in configuration:
         SocketService.__init__(self, configuration=configuration, name=name)
         self.poll = SocketService
         self.options_ = dict(regex=REGEX['socket'],
                              stat='show stat\n'.encode(),
                              info='show info\n'.encode())
     else:
         UrlService.__init__(self, configuration=configuration, name=name)
         self.poll = UrlService
         self.options_ = dict(regex=REGEX['url'],
                              stat=self.url,
                              info=url_remove_params(self.url))
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #29
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host', '127.0.0.1')
     self.port = self.configuration.get('port', 8332)
     self.url = '{scheme}://{host}:{port}'.format(
         scheme=self.configuration.get('scheme', 'http'),
         host=self.host,
         port=self.port,
     )
     self.method = 'POST'
     self.header = {
         'Content-Type': 'application/json',
     }
Beispiel #30
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.protocol = self.configuration.get('protocol', DEFAULT_PROTOCOL)
     self.host = self.configuration.get('host', DEFAULT_HOST)
     self.url = '{}://{}/api/v1/allmetrics?format=json'.format(self.protocol, self.host)
     self.charts_regex = re.compile(self.configuration.get('charts_regex', DEFAULT_CHARTS_REGEX))
     self.charts_to_exclude = self.configuration.get('charts_to_exclude', '').split(',')
     self.mode = self.configuration.get('mode', DEFAULT_MODE)
     self.n_score_samples = int(self.configuration.get('n_score_samples', DEFAULT_N_SCORE_SAMPLES))
     self.show_scores = int(self.configuration.get('show_scores', DEFAULT_SHOW_SCORES))
     self.cf_r = float(self.configuration.get('cf_r', DEFAULT_CF_R))
     self.cf_order = int(self.configuration.get('cf_order', DEFAULT_CF_ORDER))
     self.cf_smooth = int(self.configuration.get('cf_smooth', DEFAULT_CF_SMOOTH))
     self.cf_diff = bool(self.configuration.get('cf_diff', DEFAULT_CF_DIFF))
     self.cf_threshold = float(self.configuration.get('cf_threshold', DEFAULT_CF_THRESHOLD))
     self.collected_dims = {'scores': set(), 'flags': set()}
     self.models = {}
     self.x_latest = {}
     self.scores_latest = {}
     self.scores_samples = {}
Beispiel #31
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     base_url = self.configuration.get('url', 'http://localhost:2812')
     self.url = '{0}/_status?format=xml&level=full'.format(base_url)
Beispiel #32
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = list(ORDER)
     self.definitions = deepcopy(CHARTS)
     self.objects = dict()
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.url = self.configuration.get('url')
     self._manager = self._build_manager()
Beispiel #34
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url', 'http://127.0.0.1:5066/stats')
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #35
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.baseurl = self.configuration.get('url', 'http://localhost:9090')
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #36
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = 'https://{0}:8140'.format(socket.getfqdn())
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #37
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url')
     self.follow_redirect = self.configuration.get('redirect', True)
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #38
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #39
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.url = self.configuration.get('url')
     self._manager = self._build_manager()
Beispiel #40
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url', "http://127.0.0.1:8080/manager/status?XML=true")
     self.connector_name = self.configuration.get('connector_name', None)
     self.order = ORDER
     self.definitions = CHARTS
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url', "http://localhost:8080/metrics")
     self._setup_charts()
Beispiel #42
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.baseurl = self.configuration.get('url', 'http://localhost:9090')
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #43
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url',
                                       "http://localhost:8080/metrics")
     self._setup_charts()
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #45
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.url = self.configuration.get('url', 'http://localhost/server-status?auto')
Beispiel #46
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.url = configuration.get('url', 'http://127.0.0.1:8081/api/v1/servers/localhost/statistics')
Beispiel #47
0
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.url = self.configuration.get(
         'url', 'http://localhost/server-status?auto')