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


Python test.get_collector_config函数代码示例

本文整理汇总了Python中test.get_collector_config函数的典型用法代码示例。如果您正苦于以下问题:Python get_collector_config函数的具体用法?Python get_collector_config怎么用?Python get_collector_config使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: setUp

    def setUp(self, config=None):
        if config is None:
            config = get_collector_config('UptimeCollector', {
                'interval': '10',
            })
        else:
            config = get_collector_config('UptimeCollector', config)

        self.collector = UptimeCollector(config, None)
开发者ID:Affirm,项目名称:Diamond,代码行数:9,代码来源:test_uptime.py

示例2: setUp

    def setUp(self, config=None):
        if config is None:
            config = get_collector_config('SunOSDiskHealthCollector',
                                          {'interval': '10'})
        else:
            config = get_collector_config('SunOSDiskHealthCollector',
                                          config)

        self.collector = SunOSDiskHealthCollector(config, None)
开发者ID:snltd,项目名称:sunos-diamond-collectors,代码行数:9,代码来源:test_sunos_disk_health.py

示例3: setUp

    def setUp(self, config=None):
        if config is None:
            config = get_collector_config("WebsiteCollector", {"url": ""})
        else:
            config = get_collector_config("WebsiteCollector", config)

        self.collector = WebsiteMonitorCollector(config, None)

        self.patcher = patch("urllib2.urlopen")
        self.urlopen_mock = self.patcher.start()
开发者ID:peterkh,项目名称:Diamond,代码行数:10,代码来源:testwebsitemonitor.py

示例4: setUp

    def setUp(self, config=None):
        if config is None:
            config = get_collector_config('WebsiteCollector', {
                'url': ''
                })
        else:
            config = get_collector_config('WebsiteCollector', config)

        self.collector = WebsiteMonitorCollector(config, None)

        self.patcher = patch('urllib2.urlopen')
        self.urlopen_mock = self.patcher.start()
开发者ID:1and1,项目名称:Diamond,代码行数:12,代码来源:testwebsitemonitor.py

示例5: setUp

    def setUp(self, config=None):
        if config is None:
            config = get_collector_config(
                "HttpdCollector", {"interval": "10", "url": "http://www.example.com:80/server-status?auto"}
            )
        else:
            config = get_collector_config("HttpdCollector", config)

        self.collector = HttpdCollector(config, None)

        self.HTTPResponse = TestHTTPResponse()

        httplib.HTTPConnection.request = Mock(return_value=True)
        httplib.HTTPConnection.getresponse = Mock(return_value=self.HTTPResponse)
开发者ID:Crapworks,项目名称:Diamond,代码行数:14,代码来源:testhttpd.py

示例6: setUp

 def setUp(self):
     config = get_collector_config('MongoDBCollector', {
         'host': 'localhost:27017',
         'databases': '^db'
     })
     self.collector = MongoDBCollector(config, None)
     self.connection = MagicMock()
开发者ID:KlavsKlavsen,项目名称:Diamond,代码行数:7,代码来源:testmongodb.py

示例7: setUp

    def setUp(self):
        config = get_collector_config('MemoryCgroupCollector', {
            'interval': 10,
            'byte_unit': 'megabyte'
        })

        self.collector = MemoryCgroupCollector(config, None)
开发者ID:50onRed,项目名称:Diamond,代码行数:7,代码来源:testmemory_cgroup.py

示例8: setUp

    def setUp(self):
        config = get_collector_config('TwemproxyCollector', {
            'interval': 60,
            'hosts': ['localhost:22222'],
        })

        self.collector = TwemproxyCollector(config, None)
开发者ID:Affirm,项目名称:Diamond,代码行数:7,代码来源:testtwemproxy.py

示例9: setUp

    def setUp(self):
        config = get_collector_config('DiskSpaceCollector', {
            'interval': 10,
            'byte_unit': ['gigabyte'],
        })

        self.collector = DiskSpaceCollector(config, None)
开发者ID:arunthampi,项目名称:Diamond,代码行数:7,代码来源:testdiskspace.py

示例10: setUp

    def setUp(self):
        config = get_collector_config('UserScriptsCollector', {
            'interval': 10,
            'scripts_path': os.path.dirname(__file__) + '/fixtures/',
        })

        self.collector = UserScriptsCollector(config, None)
开发者ID:adreyer,项目名称:Diamond,代码行数:7,代码来源:testuserscripts.py

示例11: setUp

    def setUp(self):
        config = get_collector_config('NetworkCollector', {
            'interval':  10,
            'byte_unit': ['megabit', 'megabyte'],
        })

        self.collector = NetworkCollector(config, None)
开发者ID:dotscreen,项目名称:Diamond,代码行数:7,代码来源:testnetwork.py

示例12: setUp

    def setUp(self):
        config = get_collector_config('RedisCollector', {
            'interval': '1',
            'databases': 1,
        })

        self.collector = RedisCollector(config, None)
开发者ID:ArthurJ,项目名称:Diamond,代码行数:7,代码来源:testredisstat.py

示例13: setUp

    def setUp(self):
        config = get_collector_config('KVMCollector', {
            'interval': 10,
        })

        self.collector = KVMCollector(config, None)
        self.collector.PROC = os.path.dirname(__file__) + '/fixtures/'
开发者ID:1and1,项目名称:Diamond,代码行数:7,代码来源:testkvm.py

示例14: setUp

    def setUp(self, config=None):
        if config is None:
            config = get_collector_config('HttpdCollector', {
                'interval': '10',
                'url':      ''
            })
        else:
            config = get_collector_config('HttpdCollector', config)

        self.collector = HttpdCollector(config, None)

        self.HTTPResponse = TestHTTPResponse()

        httplib.HTTPConnection.request = Mock(return_value=True)
        httplib.HTTPConnection.getresponse = Mock(
            return_value=self.HTTPResponse)
开发者ID:Dieterbe,项目名称:Diamond,代码行数:16,代码来源:testhttpd.py

示例15: setUp

    def setUp(self):
        config = get_collector_config('HttpCollector', {
            'req_vhost': 'www.my_server.com',
            'req_url': ['http://www.my_server.com/']
        })

        self.collector = HttpCollector(config, None)
开发者ID:1and1,项目名称:Diamond,代码行数:7,代码来源:testhttp.py


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