当前位置: 首页>>代码示例>>Python>>正文


Python UrlService.__init__方法代码示例

本文整理汇总了Python中bases.FrameworkServices.UrlService.UrlService.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python UrlService.__init__方法的具体用法?Python UrlService.__init__怎么用?Python UrlService.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bases.FrameworkServices.UrlService.UrlService的用法示例。


在下文中一共展示了UrlService.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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
开发者ID:salewski,项目名称:netdata,代码行数:9,代码来源:ipfs.chart.py

示例2: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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')
开发者ID:FedericoCeratto,项目名称:netdata,代码行数:9,代码来源:rabbitmq.chart.py

示例3: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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)
开发者ID:firehol,项目名称:netdata,代码行数:10,代码来源:httpcheck.chart.py

示例4: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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])
开发者ID:FedericoCeratto,项目名称:netdata,代码行数:12,代码来源:phpfpm.chart.py

示例5: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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()
开发者ID:firehol,项目名称:netdata,代码行数:12,代码来源:rabbitmq.chart.py

示例6: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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()
开发者ID:Peoplecantfly,项目名称:netdata,代码行数:13,代码来源:elasticsearch.chart.py

示例7: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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
开发者ID:FedericoCeratto,项目名称:netdata,代码行数:15,代码来源:traefik.chart.py

示例8: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
    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)
开发者ID:firehol,项目名称:netdata,代码行数:16,代码来源:go_expvar.chart.py

示例9: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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()
开发者ID:lanzhiwang,项目名称:netdata,代码行数:16,代码来源:couchdb.chart.py

示例10: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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
开发者ID:swinsey,项目名称:netdata,代码行数:17,代码来源:haproxy.chart.py

示例11: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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',
     }
开发者ID:firehol,项目名称:netdata,代码行数:17,代码来源:energid.chart.py

示例12: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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')
开发者ID:firehol,项目名称:netdata,代码行数:7,代码来源:powerdns.chart.py

示例13: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 def __init__(self, configuration=None, name=None):
     UrlService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
开发者ID:FedericoCeratto,项目名称:netdata,代码行数:6,代码来源:powerdns.chart.py

示例14: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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')
开发者ID:cppmx,项目名称:netdata,代码行数:7,代码来源:apache.chart.py

示例15: __init__

# 需要导入模块: from bases.FrameworkServices.UrlService import UrlService [as 别名]
# 或者: from bases.FrameworkServices.UrlService.UrlService import __init__ [as 别名]
 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)
开发者ID:firehol,项目名称:netdata,代码行数:8,代码来源:monit.chart.py


注:本文中的bases.FrameworkServices.UrlService.UrlService.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。