Exemple #1
0
def getHealth(config):
    # take basic informations
    health = basicHealth()
    # complete with ours
    slots = {
        "slottotal" : config["slots"],
        "slotused" : ProcessList().getProcessCount()
    }

    health.update({'slots': slots})
    return health
Exemple #2
0
def getHealth(config):
    # take basic informations
    health = basicHealth()
    # complete with ours
    slots = {
        "slottotal": config["slots"],
        "slotused": ProcessList().getProcessCount()
    }

    health.update({'slots': slots})
    return health
Exemple #3
0
def getHealth():
    # take basic informations
    health = basicHealth()
    try:
        # add data about the current database connections pool
        pool = MscDatabase().db.pool
        health['db'] = { 'poolsize' : str(pool.size()),
                         'checkedinconns' : str(pool.checkedin()),
                         'overflow' : str(pool.overflow()),
                         'checkedoutconns': str(pool.checkedout()),
                         'recycle' : str(pool._recycle) }
    except Exception, e:
        logging.getLogger().warn('scheduler %s: HEALTH: got the following error : %s' % (SchedulerConfig().name, e))