def __init__(self, configuration=None, name=None): # The unbound control protocol is always TLS encapsulated # unless it's used over a UNIX socket, so enable TLS _before_ # doing the normal SocketService initialization. configuration['tls'] = True self.port = 8935 SocketService.__init__(self, configuration, name) self.ext = self.configuration.get('extended', None) self.ubconf = self.configuration.get('ubconf', None) self.perthread = self.configuration.get('per_thread', False) self.threads = None self.order = deepcopy(ORDER) self.definitions = deepcopy(CHARTS) self.request = 'UBCT1 stats\n' self.statmap = deepcopy(STAT_MAP) self._parse_config() self._auto_config() self.debug('Extended stats: {0}'.format(self.ext)) self.debug('Per-thread stats: {0}'.format(self.perthread)) if self.ext: self.order = self.order + EXTENDED_ORDER self.definitions.update(EXTENDED_CHARTS) if self.unix_socket: self.debug('Using unix socket: {0}'.format(self.unix_socket)) else: self.debug('Connecting to: {0}:{1}'.format(self.host, self.port)) self.debug('Using key: {0}'.format(self.key)) self.debug('Using certificate: {0}'.format(self.cert))
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self._keep_alive = True self.request = "" self.host = "localhost" self.port = 3128 self.order = ORDER self.definitions = CHARTS
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self.order = ORDER self.definitions = CHARTS self.host = None # localhost self.port = None # 24242 self.unix_socket = UNIX_SOCKET self.request = 'EXPORT\tglobal\r\n'
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self._keep_alive = True self.request = '' self.host = 'localhost' self.port = 3128 self.order = ORDER self.definitions = CHARTS
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self.request = 'EXPORT\tglobal\r\n' self.host = None # localhost self.port = None # 24242 # self._keep_alive = True self.unix_socket = '/var/run/dovecot/stats' self.order = ORDER self.definitions = CHARTS
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self.order = ORDER self.definitions = CHARTS self._keep_alive = True self.host = self.configuration.get('host', 'localhost') self.port = self.configuration.get('port', 6379) self.db = self.configuration.get('db', None) self.password = self.configuration.get('pass', str())
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self.request = "EXPORT\tglobal\r\n" self.host = None # localhost self.port = None # 24242 # self._keep_alive = True self.unix_socket = "/var/run/dovecot/stats" self.order = ORDER self.definitions = CHARTS
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self.order = ORDER self.definitions = deepcopy(CHARTS) self._keep_alive = False self.request = "" self.host = "127.0.0.1" self.port = 7634 self.do_only = self.configuration.get('devices')
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self.order = ORDER self.definitions = CHARTS self.request = "" self.host = None self.port = None self.unix_socket = self.configuration.get('status_socket_path', None)
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self.request = 'stats\r\n' self.host = 'localhost' self.port = 11211 self._keep_alive = True self.unix_socket = None self.order = ORDER self.definitions = CHARTS
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self.order = ORDER self.definitions = deepcopy(CHARTS) self.do_only = self.configuration.get('devices') self._keep_alive = False self.request = "" self.host = "127.0.0.1" self.port = 7634
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self.order = ORDER self.definitions = CHARTS self.host = None self.port = None self.unix_socket = UNIX_SOCKET # self._keep_alive = True self.request = 'GET all'
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self.order = list() self.definitions = dict() self._keep_alive = True self.host = self.configuration.get('host', 'localhost') self.port = self.configuration.get('port', 6379) self.unix_socket = self.configuration.get('socket') p = self.configuration.get('pass') self.auth_request = 'AUTH {0} \r\n'.format(p).encode() if p else None self.request = 'INFO\r\n'.encode() self.bgsave_time = 0
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self.order = ORDER self.definitions = CHARTS self._keep_alive = True self.chart_name = "" self.host = self.configuration.get('host', 'localhost') self.port = self.configuration.get('port', 6379) self.unix_socket = self.configuration.get('socket') password = self.configuration.get('pass', str()) self.bgsave_time = 0 self.requests = dict(request='INFO\r\n'.encode(), password='******'.join(['AUTH', password, '\r\n']).encode() if password else None) self.request = self.requests['request']
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) self.order = list(ORDER) self.definitions = dict(CHARTS) self.port = 'ntp' self.dgram_socket = True self.system = System() self.peers = dict() self.request = str() self.retries = 0 self.show_peers = self.configuration.get('show_peers', False) self.peer_rescan = self.configuration.get('peer_rescan', 60) if self.show_peers: self.definitions.update(PEER_CHARTS)
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
def __init__(self, configuration=None, name=None): SocketService.__init__(self, configuration=configuration, name=name) # Default TeamSpeak Server connection settings. self.host = "127.0.0.1" self.port = "10011" self.user = "" self.passwd = "" self.sid = 1 self.nickname = "netdata" self.channel_id = None # Connection socket settings. self.unix_socket = None self._keep_alive = True self.request = "serverinfo\n" # Chart information handled by netdata. self.order = ORDER self.definitions = CHARTS