"""
.. module: lemur.common.health
    :platform: Unix
    :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more
    :license: Apache, see LICENSE for more details.

.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
"""
from flask import Blueprint

mod = Blueprint('healthCheck', __name__)


@mod.route('/healthcheck')
def health():
    return 'ok'

@@ -250,16 +250,46 @@
 lueprint
+%0Afrom lemur.database import db
 %0A%0Amod = 
@@ -374,16 +374,229 @@
     
-return 'ok'
+try:%0A        if healthcheck(db):%0A            return 'ok'%0A    except:%0A        return 'db check failed'%0A%0A%0Adef healthcheck(db):%0A    with db.engine.connect() as connection:%0A        connection.execute('SELECT 1;')%0A    return True
 %0A

Add Check of DB connections on healthcheck URL (#812)