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)
评论列表
文章目录