コード例 #1
0
ファイル: agent.py プロジェクト: PagerDuty/dd-agent
class DDForwarder(multiprocessing.Process):
    def __init__(self, agentConfig, hostname):
        multiprocessing.Process.__init__(self, name='ddforwarder')
        self.config = agentConfig
        self.is_enabled = True
        self.hostname = hostname

    def run(self):
        from config import initialize_logging
        initialize_logging('windows_forwarder')
        log.debug("Windows Service - Starting forwarder")
        set_win32_cert_path()
        port = self.config.get('listen_port', 17123)
        if port is None:
            port = 17123
        else:
            port = int(port)
        app_config = get_config(parse_args=False)
        self.forwarder = Application(port, app_config, watchdog=False)
        try:
            self.forwarder.run()
        except Exception:
            log.exception("Uncaught exception in the forwarder")

    def stop(self):
        log.debug("Windows Service - Stopping forwarder")
        self.forwarder.stop()
コード例 #2
0
ファイル: agent.py プロジェクト: wk8/dd-agent
class DDForwarder(multiprocessing.Process):
    def __init__(self, agentConfig, hostname, **options):
        multiprocessing.Process.__init__(self, name='ddforwarder')
        self.config = agentConfig
        self.is_enabled = True
        self.hostname = hostname
        self.options = options

    def run(self):
        from config import initialize_logging
        initialize_logging('windows_forwarder')
        log.debug("Windows Service - Starting forwarder")
        set_win32_cert_path()
        port = self.config.get('listen_port', 17123)
        if port is None:
            port = 17123
        else:
            port = int(port)
        app_config = get_config(parse_args=False)
        self.forwarder = Application(port, app_config, watchdog=False)
        try:
            self.forwarder.run()
        except Exception:
            log.exception("Uncaught exception in the forwarder")

    def stop(self):
        log.debug("Windows Service - Stopping forwarder")
        self.forwarder.stop()
コード例 #3
0
 def use_lots_of_memory(self):
     # Skip this step on travis
     if os.environ.get('TRAVIS', False): return
     a = Application(12345, {"bind_host": "localhost"})
     a._watchdog = Watchdog(30, 50)
     a._tr_manager = MemoryHogTxManager()
     a.run()
コード例 #4
0
ファイル: agent.py プロジェクト: jkoppe/dd-agent
 def __init__(self, agentConfig):
     threading.Thread.__init__(self)
     set_win32_cert_path()
     self.config = get_config(parse_args=False)
     port = agentConfig.get('listen_port', 17123)
     if port is None:
         port = 17123
     else:
         port = int(port)
     self.port = port
     self.forwarder = Application(port, agentConfig, watchdog=False)
コード例 #5
0
ファイル: agent.py プロジェクト: yekeqiang/dd-agent
 def run(self):
     log.debug("Windows Service - Starting forwarder")
     set_win32_cert_path()
     port = self.config.get('listen_port', 17123)
     if port is None:
         port = 17123
     else:
         port = int(port)
     app_config = get_config(parse_args=False)
     self.forwarder = Application(port, app_config, watchdog=False)
     self.forwarder.run()
コード例 #6
0
 def run(self):
     from config import initialize_logging; initialize_logging('windows_forwarder')
     log.debug("Windows Service - Starting forwarder")
     set_win32_cert_path()
     port = self.config.get('listen_port', 17123)
     if port is None:
         port = 17123
     else:
         port = int(port)
     app_config = get_config(parse_args=False)
     self.forwarder = Application(port, app_config, watchdog=False)
     try:
         self.forwarder.run()
     except Exception:
         log.exception("Uncaught exception in the forwarder")
コード例 #7
0
ファイル: agent.py プロジェクト: CaptTofu/dd-agent
class DDForwarder(threading.Thread):
    def __init__(self, agentConfig):
        threading.Thread.__init__(self)
        set_win32_cert_path()
        self.config = get_config(parse_args = False)
        port = agentConfig.get('listen_port', 17123)
        if port is None:
            port = 17123
        else:
            port = int(port)
        self.port = port
        self.forwarder = Application(port, agentConfig, watchdog=False)

    def run(self):
        self.forwarder.run()        

    def stop(self):
        self.forwarder.stop()
コード例 #8
0
ファイル: agent.py プロジェクト: sschepens/dd-agent
 def __init__(self, agentConfig):
     threading.Thread.__init__(self)
     set_win32_cert_path()
     self.config = get_config(parse_args=False)
     port = agentConfig.get("listen_port", 17123)
     if port is None:
         port = 17123
     else:
         port = int(port)
     self.port = port
     self.forwarder = Application(port, agentConfig, watchdog=False)
コード例 #9
0
ファイル: agent.py プロジェクト: bakins/dd-agent
class DDForwarder(multiprocessing.Process):
    def __init__(self, agentConfig):
        multiprocessing.Process.__init__(self, name='ddforwarder')
        self.config = agentConfig

    def run(self):
        log.debug("Windows Service - Starting forwarder")
        set_win32_cert_path()
        port = self.config.get('listen_port', 17123)
        if port is None:
            port = 17123
        else:
            port = int(port)
        app_config = get_config(parse_args = False)
        self.forwarder = Application(port, app_config, watchdog=False)
        self.forwarder.run()

    def stop(self):
        log.debug("Windows Service - Stopping forwarder")
        self.forwarder.stop()
コード例 #10
0
ファイル: agent.py プロジェクト: Osterjour/dd-agent
 def run(self):
     log.debug("Windows Service - Starting forwarder")
     set_win32_cert_path()
     port = self.config.get('listen_port', 17123)
     if port is None:
         port = 17123
     else:
         port = int(port)
     app_config = get_config(parse_args = False)
     self.forwarder = Application(port, app_config, watchdog=False)
     self.forwarder.run()
コード例 #11
0
ファイル: agent.py プロジェクト: wang-arthur/dd-agent
class DDForwarder(multiprocessing.Process):
    def __init__(self, agentConfig):
        multiprocessing.Process.__init__(self, name='ddforwarder')
        self.config = agentConfig

    def run(self):
        log.debug("Windows Service - Starting forwarder")
        set_win32_cert_path()
        port = self.config.get('listen_port', 17123)
        if port is None:
            port = 17123
        else:
            port = int(port)
        app_config = get_config(parse_args=False)
        self.forwarder = Application(port, app_config, watchdog=False)
        self.forwarder.run()

    def stop(self):
        log.debug("Windows Service - Stopping forwarder")
        self.forwarder.stop()
コード例 #12
0
class DDForwarder(threading.Thread):
    def __init__(self, agentConfig):
        threading.Thread.__init__(self)
        set_win32_cert_path()
        self.config = get_config(parse_args=False)
        port = agentConfig.get('listen_port', 17123)
        if port is None:
            port = 17123
        else:
            port = int(port)
        self.port = port
        self.forwarder = Application(port, agentConfig, watchdog=False)

    def run(self):
        log.debug("Windows Service - Starting forwarder")
        self.forwarder.run()

    def stop(self):
        log.debug("Windows Service - Stopping forwarder")
        self.forwarder.stop()
コード例 #13
0
ファイル: test_watchdog.py プロジェクト: wang-arthur/dd-agent
 def use_lots_of_memory(self):
     # Skip this step on travis
     if os.environ.get('TRAVIS', False): return
     a = Application(12345, {})
     a._watchdog = Watchdog(30, 50)
     a._tr_manager = MemoryHogTxManager()
     a.run()
コード例 #14
0
ファイル: agent.py プロジェクト: jhotta/dd-agent
 def run(self):
     from config import initialize_logging; initialize_logging('windows_forwarder')
     log.debug("Windows Service - Starting forwarder")
     set_win32_cert_path()
     port = self.config.get('listen_port', 17123)
     if port is None:
         port = 17123
     else:
         port = int(port)
     app_config = get_config(parse_args = False)
     self.forwarder = Application(port, app_config, watchdog=False)
     try:
         self.forwarder.run()
     except Exception:
         log.exception("Uncaught exception in the forwarder")
コード例 #15
0
ファイル: test_watchdog.py プロジェクト: motusllc/dd-agent
 def slow_tornado(self):
     a = Application(12345, self.AGENT_CONFIG)
     a._watchdog = Watchdog(4)
     a._tr_manager = MockTxManager()
     a.run()
コード例 #16
0
 def slow_tornado(self):
     a = Application(12345, self.AGENT_CONFIG)
     a._watchdog = Watchdog(4)
     a._tr_manager = MockTxManager()
     a.run()
コード例 #17
0
ファイル: test_watchdog.py プロジェクト: wang-arthur/dd-agent
 def fast_tornado(self):
     a = Application(12345, {})
     a._watchdog = Watchdog(6)
     a._tr_manager = MockTxManager()
     a.run()
コード例 #18
0
ファイル: test_watchdog.py プロジェクト: etrepum/dd-agent
 def fast_tornado(self):
     a = Application(12345, {"bind_host": "localhost"})
     a._watchdog = Watchdog(6)
     a._tr_manager = MockTxManager()
     a.run()
コード例 #19
0
ファイル: test_watchdog.py プロジェクト: dwradcliffe/dd-agent
 def use_lots_of_memory(self):
     a = Application(12345, {})
     a._watchdog = Watchdog(30, 50)
     a._tr_manager = MemoryHogTxManager()
     a.run()
コード例 #20
0
ファイル: test_watchdog.py プロジェクト: dwradcliffe/dd-agent
 def fast_tornado(self):
     a = Application(12345, {})
     a._watchdog = Watchdog(6)
     a._tr_manager = MockTxManager()
     a.run()
コード例 #21
0
ファイル: test_watchdog.py プロジェクト: p1r4te/dd-agent
 def fast_tornado(self):
     a = Application(12345, {"bind_host": "localhost"})
     a._watchdog = Watchdog(6)
     a._tr_manager = MockTxManager()
     a.run()