Merge pull request #274 from kevgliss/metric_fix
Fixing an issue were metrics would not be sent
This commit is contained in:
commit
9a8e1534c0
|
@ -19,7 +19,7 @@ from logging.handlers import RotatingFileHandler
|
||||||
|
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from lemur.common.health import mod as health
|
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 = (
|
DEFAULT_BLUEPRINTS = (
|
||||||
|
@ -112,6 +112,7 @@ def configure_extensions(app):
|
||||||
migrate.init_app(app, db)
|
migrate.init_app(app, db)
|
||||||
principal.init_app(app)
|
principal.init_app(app)
|
||||||
smtp_mail.init_app(app)
|
smtp_mail.init_app(app)
|
||||||
|
metrics.init_app(app)
|
||||||
|
|
||||||
|
|
||||||
def configure_blueprints(app, blueprints):
|
def configure_blueprints(app, blueprints):
|
||||||
|
|
|
@ -112,7 +112,7 @@ class IPlugin(local):
|
||||||
def get_option(name, options):
|
def get_option(name, options):
|
||||||
for o in options:
|
for o in options:
|
||||||
if o.get('name') == name:
|
if o.get('name') == name:
|
||||||
return o.get('value')
|
return o.get('value', o.get('default'))
|
||||||
|
|
||||||
|
|
||||||
class Plugin(IPlugin):
|
class Plugin(IPlugin):
|
||||||
|
|
Loading…
Reference in New Issue