'Notify observer a failure for ip was found
Observer will check ip was known (bad) and possibly increase an retry count'

def failureFound(self, failManager, jail, ticket):

    if (not jail.isAlive()):
        return
    ip = ticket.getIP()
    unixTime = ticket.getTime()
    logSys.debug('[%s]    Observer:    failure    found    %s', jail.name, ip)
    banCount = 0
    retryCount = 1
    timeOfBan = None
    try:
        maxRetry = failManager.getMaxRetry()
        db = jail.database
        if (db is not None):
            for (banCount, timeOfBan, lastBanTime) in db.getBan(ip, jail):
                banCount = max(banCount, ticket.getBanCount())
                retryCount = (((1 << (banCount if (banCount < 20) else 20)) / 2) + 1)
                break
            retryCount = min(retryCount, maxRetry)
            if ((timeOfBan is not None) and (unixTime <= timeOfBan)):
                logSys.debug('[%s]    Ignore    failure    %s    before    last    ban    %s    <    %s,    restored', jail.name, ip, unixTime, timeOfBan)
                return
        if (retryCount <= 1):
            return
        logSys.info('[%s]    Found    %s,    bad    -    %s,    %s    #    ->    %s%s', jail.name, ip, datetime.datetime.fromtimestamp(unixTime).strftime('%Y-%m-%d    %H:%M:%S'), banCount, retryCount, (',    Ban' if (retryCount >= maxRetry) else ''))
        retryCount = failManager.addFailure(ticket, (retryCount - 1), True)
        ticket.setBanCount(banCount)
        if (retryCount >= maxRetry):
            try:
                while True:
                    ticket = failManager.toBan(ip)
                    jail.putFailTicket(ticket)
            except FailManagerEmpty:
                failManager.cleanup(MyTime.time())
    except Exception as e:
        logSys.error('%s', e, exc_info=(logSys.getEffectiveLevel() <= logging.DEBUG))
