From dbc4964e94e2946df239ff2548a902eeb0171037 Mon Sep 17 00:00:00 2001 From: kevgliss Date: Tue, 5 Apr 2016 10:23:33 -0700 Subject: [PATCH] Fixing an issue were metrics would not be sent --- lemur/factory.py | 3 ++- lemur/plugins/base/v1.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lemur/factory.py b/lemur/factory.py index 3ba7f01e..2854c227 100644 --- a/lemur/factory.py +++ b/lemur/factory.py @@ -19,7 +19,7 @@ from logging.handlers import RotatingFileHandler from flask import Flask from lemur.common.health import mod as health -from lemur.extensions import db, migrate, principal, smtp_mail +from lemur.extensions import db, migrate, principal, smtp_mail, metrics DEFAULT_BLUEPRINTS = ( @@ -112,6 +112,7 @@ def configure_extensions(app): migrate.init_app(app, db) principal.init_app(app) smtp_mail.init_app(app) + metrics.init_app(app) def configure_blueprints(app, blueprints): diff --git a/lemur/plugins/base/v1.py b/lemur/plugins/base/v1.py index 9b90e7c0..d21a71ee 100644 --- a/lemur/plugins/base/v1.py +++ b/lemur/plugins/base/v1.py @@ -112,7 +112,7 @@ class IPlugin(local): def get_option(name, options): for o in options: if o.get('name') == name: - return o.get('value') + return o.get('value', o.get('default')) class Plugin(IPlugin):