3 import monitor.config as config
5 mon_metadata = sqlalchemy.MetaData()
6 mon_metadata.bind = sqlalchemy.create_engine(config.monitor_dburi, echo=config.echo)
7 mon_session = sqlalchemy.orm.scoped_session(sqlalchemy.orm.sessionmaker(autoflush=False,autocommit=True))
8 mon_session.bind = mon_metadata.bind
10 if config.zabbix_enabled:
11 zab_metadata = sqlalchemy.MetaData()
12 zab_metadata.bind = sqlalchemy.create_engine(config.zabbix_dburi, echo=config.echo)
13 zab_session = sqlalchemy.orm.scoped_session(sqlalchemy.orm.sessionmaker(autoflush=False,autocommit=True))
14 zab_session.bind = zab_metadata.bind