本文整理汇总了Python中bases.FrameworkServices.SimpleService.SimpleService类的典型用法代码示例。如果您正苦于以下问题:Python SimpleService类的具体用法?Python SimpleService怎么用?Python SimpleService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SimpleService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
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()
示例2: __init__
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
示例3: __init__
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+)'))
示例4: __init__
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 {}
示例5: __init__
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: __init__
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: __init__
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: __init__
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
示例9: __init__
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()
示例10: __init__
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
示例11: __init__
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
}
示例12: __init__
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
示例13: __init__
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()
示例14: __init__
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)
示例15: __init__
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)