ENV OS_NOTIFIER_URI localhost:8662
ENV OS_DEFAULT_GRANULARITY 300
ENV REQUEST_TIMEOUT 10
+ENV OSMMON_LOG_LEVEL INFO
EXPOSE 8662
from osm_mon.plugins.OpenStack.Gnocchi import metrics
from osm_mon.plugins.vRealiseOps import plugin_receiver
+cfg = Config.instance()
+
logging.basicConfig(stream=sys.stdout,
- format='%(asctime)s %(message)s',
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
datefmt='%m/%d/%Y %I:%M:%S %p',
- level=logging.INFO)
+ level=logging.getLevelName(cfg.OSMMON_LOG_LEVEL))
log = logging.getLogger(__name__)
CfgParam('OS_NOTIFIER_URI', "http://localhost:8662", six.text_type),
CfgParam('OS_DEFAULT_GRANULARITY', "300", six.text_type),
CfgParam('REQUEST_TIMEOUT', 10, int),
+ CfgParam('OSMMON_LOG_LEVEL', "INFO", six.text_type),
]
_config_dict = {cfg.key: cfg for cfg in _configuration}
from six.moves.BaseHTTPServer import HTTPServer
# Initialise a logger for alarm notifier
+from osm_mon.core.settings import Config
+
+cfg = Config.instance()
logging.basicConfig(stream=sys.stdout,
- format='%(asctime)s %(message)s',
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
datefmt='%m/%d/%Y %I:%M:%S %p',
- level=logging.INFO)
+ level=logging.getLevelName(cfg.OSMMON_LOG_LEVEL))
log = logging.getLogger(__name__)
sys.path.append(os.path.abspath(os.path.join(os.path.realpath(__file__), '..', '..', '..', '..', '..')))