2013-03-01 16:58:48 +00:00
|
|
|
#!/usr/bin/env python
|
2012-12-11 11:21:54 +00:00
|
|
|
########################################
|
|
|
|
#
|
2013-03-01 16:58:48 +00:00
|
|
|
# alert-dynect - Alert DynECT Monitor
|
2012-12-17 13:41:15 +00:00
|
|
|
#
|
2012-12-11 11:21:54 +00:00
|
|
|
########################################
|
|
|
|
|
2012-12-17 13:41:15 +00:00
|
|
|
import os
|
|
|
|
import sys
|
2012-12-11 11:21:54 +00:00
|
|
|
|
2013-03-01 16:58:48 +00:00
|
|
|
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
|
|
|
os.pardir,
|
|
|
|
os.pardir))
|
|
|
|
if os.path.exists(os.path.join(possible_topdir, 'alerta', '__init__.py')):
|
|
|
|
sys.path.insert(0, possible_topdir)
|
2012-12-11 11:21:54 +00:00
|
|
|
|
2013-03-01 16:58:48 +00:00
|
|
|
from alerta.common import config
|
|
|
|
from alerta.common import log as logging
|
2013-03-03 10:48:32 +00:00
|
|
|
from alerta.dynect.daemon import DynectDaemon, Version
|
2013-01-10 10:06:32 +00:00
|
|
|
|
2013-03-01 16:58:48 +00:00
|
|
|
LOG = logging.getLogger('alerta.syslog')
|
|
|
|
CONF = config.CONF
|
2012-12-17 13:41:15 +00:00
|
|
|
|
2013-03-01 16:58:48 +00:00
|
|
|
if __name__ == '__main__':
|
2013-10-20 12:00:29 +00:00
|
|
|
config.parse_args(version=Version)
|
2013-03-01 16:58:48 +00:00
|
|
|
logging.setup('alerta')
|
|
|
|
dynect = DynectDaemon('alert-dynect')
|
|
|
|
dynect.start()
|