示例#1
0
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)
示例#2
0
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()
示例#3
0
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()