Пример #1
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.configuration = configuration
     self.order = list(ORDER)
     self.definitions = dict(CHARTS)
     self.conn = None
     self.alive = True
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.log_path = self.configuration.get('log_path')
     self.regex = dict(tls=r_compile(r'\d{1,3}(?:\.\d{1,3}){3}(?::\d+)? (?P<bytes_in>\d+) (?P<bytes_out>\d+)'),
                       static_key=r_compile(r'TCP/[A-Z]+ (?P<direction>(?:read|write)) bytes,(?P<bytes>\d+)'))
Пример #3
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.log_path = self.configuration.get('path')
     self.__glob_path = self.log_path
     self._last_position = 0
     self.__re_find = dict(current=0, run=0, maximum=60)
     self.__open_args = {'errors': 'replace'} if sys.version_info[0] > 2 else {}
Пример #4
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.__connection = None
     self.__conn_properties = dict()
     self.extra_conn_properties = dict()
     self.__queries = self.configuration.get('queries', dict())
     self.queries = dict()
Пример #5
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host')
     self.port = self.configuration.get('port')
     self.timeout = self.configuration.get('timeout', 1)
Пример #6
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = list()
     self.definitions = dict()
     self.timeout = self.configuration.get('response_timeout', 4)
     self.aggregate = self.configuration.get('aggregate', True)
     self.domains = self.configuration.get('domains')
     self.server_list = self.configuration.get('dns_servers')
Пример #7
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = deepcopy(CHARTS)
     lease_path = self.configuration.get('leases_path', '/var/lib/dhcp/dhcpd.leases')
     self.dhcpd_leases = DhcpdLeasesFile(path=lease_path)
     self.pools = list()
     self.data = dict()
Пример #8
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host', 'localhost')
     self.port = self.configuration.get('port', 0)
     self.password = self.configuration.get('password', '')
     self.client = boinc_client.BoincClient(host=self.host, port=self.port, passwd=self.password)
     self.alive = False
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.definitions = dict()
     self.order = list()
     self.attrlist = list()
     self.supply = self.configuration.get('supply', None)
     if self.supply is not None:
         self.syspath = '/sys/class/power_supply/{0}'.format(self.supply)
     self.types = self.configuration.get('charts', 'capacity').split()
Пример #10
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = deepcopy(CHARTS)
     self.log_path = configuration.get('log_path', DEF_PATH)
     self.age = configuration.get('age', DEF_AGE)
     self.exclude = configuration.get('exclude_disks', str()).split()
     self.disks = list()
     self.runs = 0
Пример #11
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.varnish = find_binary('varnishstat')
     self.order = ORDER[:]
     self.definitions = dict(CHARTS)
     self.regex_all = re.compile(r'([A-Z]+\.)?([\d\w_.]+)\s+(\d+)')
     self.regex_backend = None
     self.cache_prev = list()
     self.backend_list = list()
Пример #12
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host', 'localhost')
     self.port = self.configuration.get('port', 25575)
     self.password = self.configuration.get('password', '')
     self.console = mcrcon.MCRcon()
     self.alive = True
Пример #13
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.log_path = self.configuration.get('log_path')
     self.regex = {
         'tls': TLS_REGEX,
         'static_key': STATIC_KEY_REGEX
     }
Пример #14
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.regex = dict(disks=re_compile(r' (?P<array>[a-zA-Z_0-9]+) : active .+\['
                                        r'(?P<total_disks>[0-9]+)/'
                                        r'(?P<inuse_disks>[0-9]+)\]'),
                       status=re_compile(r' (?P<array>[a-zA-Z_0-9]+) : active .+ '
                                         r'(?P<operation>[a-z]+) =[ ]{1,2}'
                                         r'(?P<operation_status>[0-9.]+).+finish='
                                         r'(?P<finish>([0-9.]+))min speed='
                                         r'(?P<speed>[0-9]+)'))
Пример #15
0
 def __init__(self, configuration=None, name=None):
     self._sock = None
     self._keep_alive = False
     self.host = 'localhost'
     self.port = None
     self.unix_socket = None
     self.request = ''
     self.__socket_config = None
     self.__empty_request = "".encode()
     SimpleService.__init__(self, configuration=configuration, name=name)
Пример #16
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.named_stats_path = self.configuration.get('named_stats_path', '/var/log/bind/named.stats')
     self.rndc = find_binary('rndc')
     self.data = dict(nms_requests=0, nms_responses=0, nms_failure=0, nms_auth=0,
                      nms_non_auth=0, nms_nxrrset=0, nms_success=0, nms_nxdomain=0,
                      nms_recursion=0, nms_duplicate=0, nms_rejected_queries=0,
                      nms_dropped_queries=0)
Пример #17
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url')
     self.user = self.configuration.get('user')
     self.password = self.configuration.get('pass')
     self.proxy_user = self.configuration.get('proxy_user')
     self.proxy_password = self.configuration.get('proxy_pass')
     self.proxy_url = self.configuration.get('proxy_url')
     self.header = self.configuration.get('header')
     self.request_timeout = self.configuration.get('timeout', 1)
     self._manager = None
Пример #18
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = deepcopy(CHARTS)
     self.user = configuration.get('user')
     self.password = configuration.get('password')
     self.server = configuration.get('server')
     self.service = configuration.get('service')
     self.alive = False
     self.conn = None
     self.active_tablespaces = set()
Пример #19
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = list(ORDER)
     self.definitions = cluster_charts()
     self.host = self.configuration.get('host', '127.0.0.1')
     self.port = self.configuration.get('port', 28015)
     self.user = self.configuration.get('user', 'admin')
     self.password = self.configuration.get('password')
     self.timeout = self.configuration.get('timeout', 2)
     self.conn = None
     self.alive = True
Пример #20
0
    def __init__(self, configuration=None, name=None):
        SimpleService.__init__(self, configuration=configuration, name=name)
        self.log_path = self.configuration.get('log_path', '/var/log/smartd')
        self.raw = self.configuration.get('raw_values', True)
        self.exclude = self.configuration.get('exclude_disks', str()).split()
        self.age = self.configuration.get('age', 30)

        self.runs = 0
        self.disks = list()
        self.order = list()
        self.definitions = dict()
Пример #21
0
 def __init__(self, configuration=None, name=None):
     prefix = os.getenv('NETDATA_HOST_PREFIX', "")
     if prefix.endswith('/'):
         prefix = prefix[:-1]
     self.sys_dir = prefix + "/sys/devices/system/cpu"
     self.schedstat_path = prefix + "/proc/schedstat"
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = []
     self.definitions = {}
     self.fake_name = 'cpu'
     self.assignment = {}
     self.last_schedstat = None
Пример #22
0
 def __init__(self, configuration=None, name=None):
     prefix = os.getenv('NETDATA_HOST_PREFIX', "")
     if prefix.endswith('/'):
         prefix = prefix[:-1]
     self.sys_dir = prefix + "/sys/devices"
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.fake_name = 'cpu'
     self.assignment = {}
     self.accurate_exists = True
     self.accurate_last = {}
Пример #23
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER[:]
     self.definitions = deepcopy(CHARTS)
     self.user = self.configuration.get('user')
     self.password = self.configuration.get('pass')
     self.host = self.configuration.get('host', '127.0.0.1')
     self.port = self.configuration.get('port', 27017)
     self.timeout = self.configuration.get('timeout', 100)
     self.metrics_to_collect = deepcopy(DEFAULT_METRICS)
     self.connection = None
     self.do_replica = None
     self.databases = list()
Пример #24
0
    def __init__(self, configuration=None, name=None):
        SimpleService.__init__(self, configuration=configuration, name=name)
        self.order = ORDER
        self.definitions = CHARTS

        self.server = configuration.get('server', DEFAULT_SERVER)
        self.port = configuration.get('port', DEFAULT_PORT)
        self.username = configuration.get('username')
        self.password = configuration.get('password')
        self.timeout = configuration.get('timeout', DEFAULT_TIMEOUT)

        self.alive = False
        self.conn = None
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER[:]
     self.definitions = deepcopy(CHARTS)
     self.table_stats = configuration.pop('table_stats', False)
     self.index_stats = configuration.pop('index_stats', False)
     self.database_poll = configuration.pop('database_poll', None)
     self.configuration = configuration
     self.connection = False
     self.server_version = None
     self.data = dict()
     self.locks_zeroed = dict()
     self.databases = list()
     self.secondaries = list()
     self.queries = QUERY_STATS.copy()
Пример #26
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.host = self.configuration.get('host', DEFAULT_HOST)
     self.port = self.configuration.get('port', DEFAULT_PORT)
     self.secret = self.configuration.get('secret')
     self.do_acct = self.configuration.get('acct', DEFAULT_DO_ACCT)
     self.do_proxy_auth = self.configuration.get('proxy_auth', DEFAULT_DO_PROXY_AUTH)
     self.do_proxy_acct = self.configuration.get('proxy_acct', DEFAULT_DO_PROXY_ACCT)
     self.echo = find_binary('echo')
     self.radclient = find_binary('radclient')
     self.sub_echo = [self.echo, RADIUS_MSG]
     self.sub_radclient = radclient_status(
         self.radclient, RADCLIENT_RETRIES, RADCLIENT_TIMEOUT, self.host, self.port, self.secret,
     )
Пример #27
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.definitions = CHARTS
     self.host = self.configuration.get('host', 'localhost')
     self.port = self.configuration.get('port', '18121')
     self.secret = self.configuration.get('secret')
     self.acct = self.configuration.get('acct', False)
     self.proxy_auth = self.configuration.get('proxy_auth', False)
     self.proxy_acct = self.configuration.get('proxy_acct', False)
     chart_choice = [True, bool(self.acct), bool(self.proxy_auth), bool(self.proxy_acct)]
     self.order = [chart for chart, choice in zip(ORDER, chart_choice) if choice]
     self.echo = find_binary('echo')
     self.radclient = find_binary('radclient')
     self.sub_echo = [self.echo, RADIUS_MSG]
     self.sub_radclient = [self.radclient, '-r', '1', '-t', '1', '-x',
                           ':'.join([self.host, self.port]), 'status', self.secret]
Пример #28
0
 def __init__(self, configuration=None, name=None):
     self._sock = None
     self._keep_alive = False
     self.host = 'localhost'
     self.port = None
     self.unix_socket = None
     self.dgram_socket = False
     self.request = ''
     self.tls = False
     self.cert = None
     self.key = None
     self.__socket_config = None
     self.__empty_request = "".encode()
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.connect_timeout = configuration.get('connect_timeout', DEFAULT_CONNECT_TIMEOUT)
     self.read_timeout = configuration.get('read_timeout', DEFAULT_READ_TIMEOUT)
     self.write_timeout = configuration.get('write_timeout', DEFAULT_WRITE_TIMEOUT)
Пример #29
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.url = self.configuration.get('url')
     self.user = self.configuration.get('user')
     self.password = self.configuration.get('pass')
     self.proxy_user = self.configuration.get('proxy_user')
     self.proxy_password = self.configuration.get('proxy_pass')
     self.proxy_url = self.configuration.get('proxy_url')
     self.method = self.configuration.get('method', 'GET')
     self.header = self.configuration.get('header')
     self.request_timeout = self.configuration.get('timeout', 1)
     self.respect_retry_after_header = self.configuration.get('respect_retry_after_header')
     self.tls_verify = self.configuration.get('tls_verify')
     self.tls_ca_file = self.configuration.get('tls_ca_file')
     self.tls_key_file = self.configuration.get('tls_key_file')
     self.tls_cert_file = self.configuration.get('tls_cert_file')
     self._manager = None
Пример #30
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = list(ORDER)
     self.definitions = deepcopy(CHARTS)
     self.do_table_stats = configuration.pop('table_stats', False)
     self.do_index_stats = configuration.pop('index_stats', False)
     self.databases_to_poll = configuration.pop('database_poll', None)
     self.statement_timeout = configuration.pop('statement_timeout', DEFAULT_STATEMENT_TIMEOUT)
     self.configuration = configuration
     self.conn = None
     self.server_version = None
     self.is_superuser = False
     self.alive = False
     self.databases = list()
     self.secondaries = list()
     self.replication_slots = list()
     self.queries = dict()
     self.data = dict()
Пример #31
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.log_path = self.configuration.get('log_path')
     self.regex = {'tls': TLS_REGEX, 'static_key': STATIC_KEY_REGEX}
Пример #32
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.sensor = W1ThermSensor()
Пример #33
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = list()
     self.definitions = dict()
     self.chips = configuration.get('chips')
Пример #34
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.command = None
Пример #35
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.log_path = self.configuration.get('path')
     self.__glob_path = self.log_path
     self._last_position = 0
     self.__re_find = dict(current=0, run=0, maximum=60)
Пример #36
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.config_file = self.configuration.get('config_file')
     self.keyring_file = self.configuration.get('keyring_file')
Пример #37
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     #values to show at graphs
     self.values = dict()
Пример #38
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.probes = []
Пример #39
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.random = SystemRandom()
Пример #40
0
 def __init__(self, configuration=None, name=None):
     SimpleService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.path = self.configuration.get('path', '/tmp/lshttpd/')
     self.files = list()