(redata, jdata, rdb, r_server, logger)
This method will be called when a monitor has false
This method will be called when a monitor has false
This method will be called when a monitor has false
def false(redata, jdata, rdb, r_server, logger):
    ''' This method will be called when a monitor has false '''
    run = True
    # Check for Trigger
    if redata['trigger'] > jdata['failcount']:
        run = False

    # Check for lastrun
    checktime = time.time() - float(redata['lastrun'])
    if checktime < redata['frequency']:
        run = False

    if redata['data']['call_on'] == 'true':
        run = False

    if run:
        if redata['data']['continuous'] == "True":
            callStathat(redata, jdata, logger)
            return True
        else:
            if jdata['check']['prev_status'] != "false":
                callStathat(redata, jdata, logger)
                return True
            else:
                line = "stathat: Skipping stathat call as monitor %s was previously false" % jdata['cid']
                logger.info(line)
                return None
    else:
        return None
def false ( redata , jdata , rdb , r_server , logger ) : run = True # Check for Trigger if redata [ 'trigger' ] > jdata [ 'failcount' ] : run = False # Check for lastrun checktime = time . time ( ) - float ( redata [ 'lastrun' ] ) if checktime < redata [ 'frequency' ] : run = False if redata [ 'data' ] [ 'call_on' ] == 'true' : run = False if run : if redata [ 'data' ] [ 'continuous' ] == "True" : callStathat ( redata , jdata , logger ) return True else : if jdata [ 'check' ] [ 'prev_status' ] != "false" : callStathat ( redata , jdata , logger ) return True else : line = "stathat: Skipping stathat call as monitor %s was previously false" % jdata [ 'cid' ] logger . info ( line ) return None else : return None