def netflowAnalyzer(config, flow_queue): global logger global pid pid = processInfo("netflowAnalyzer") logger = getLogger(config, "analyzer", pid, pid) logger.info("Start netflow Analyzer(PID: %s)" % pid) #global queue_netflow #global queue_db #queue_netflow = flow_queue myinstance = NetflowAnalyzer(config, flow_queue) myinstance.start() logger.debug("Netflow Analyzer Received Counter: %s" % totalCount)
def netflowCollector(config, queue): """ @param: config , global configuration variable """ global logger global queue_netflow pid = processInfo("netflowCollector") port = config.getint("collector","port") logger = getLogger(config, "collector", pid) queue_netflow = queue logger.info("Start netflow Collector(PID: %s)" % pid) logger.info("Netflow Listen port : %s" % port) myserver = SocketServer.UDPServer(("127.0.0.1",port),NetflowCollector) myserver.serve_forever()
def netflowCollector(config, queue): """ @param: config , global configuration variable """ global logger global queue_netflow pid = processInfo("netflowCollector") port = config.getint("collector", "port") logger = getLogger(config, "collector", pid) queue_netflow = queue logger.info("Start netflow Collector(PID: %s)" % pid) logger.info("Netflow Listen port : %s" % port) myserver = SocketServer.UDPServer(("127.0.0.1", port), NetflowCollector) myserver.serve_forever()