monitor.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:endeavour 作者: h2020-endeavour 项目源码 文件源码
def __init__(self, config, flows, sender, logger, **kwargs):
        self.logger = logger
        self.sender = sender
        self.config = config
        # collector is a class to execute queries for network status.
        self.collector = StatsCollector(InfluxDBClient(host=INFLUXDB_HOST, port=INFLUXDB_PORT, username=INFLUXDB_USER, password=INFLUXDB_PASS, database=INFLUXDB_DB, timeout=10))
        table_id = None
        self.fm_builder = FlowModMsgBuilder(0, self.config.flanc_auth["key"])
        try:
            table_id =  config.tables['monitor']
        except KeyError, e:
            print "Monitoring table does not exists in the sdx_global.cfg file! - Add a table named %s." % str(e) 
        # Build initial monitoring flows
        if flows != None:
            self.monitor_flows_builder(flows)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号