'Return the alert status relative to a current value.
Use this function for minor stats.
If current < CAREFUL of max then alert = OK
If current > CAREFUL of max then alert = CAREFUL
If current > WARNING of max then alert = WARNING
If current > CRITICAL of max then alert = CRITICAL
If highlight=True than 0.0 is highlighted
If defined \'header\' is added between the plugin name and the status.
Only useful for stats with several alert status.
If defined, \'action_key\' define the key for the actions.
By default, the action_key is equal to the header.
If log=True than add log if necessary
elif log=False than do not log
elif log=None than apply the config given in the conf file'

def get_alert(self, current=0, minimum=0, maximum=100, highlight_zero=True, is_max=False, header='', action_key=None, log=False):

    if ((not highlight_zero) and (current == 0)):
        return 'DEFAULT'
    try:
        value = ((current * 100) / maximum)
    except ZeroDivisionError:
        return 'DEFAULT'
    except TypeError:
        return 'DEFAULT'
    if (header == ''):
        stat_name = self.plugin_name
    else:
        stat_name = ((self.plugin_name + '_') + header)
    ret = ('MAX' if is_max else 'OK')
    try:
        if (value >= self.get_limit('critical', stat_name=stat_name)):
            ret = 'CRITICAL'
        elif (value >= self.get_limit('warning', stat_name=stat_name)):
            ret = 'WARNING'
        elif (value >= self.get_limit('careful', stat_name=stat_name)):
            ret = 'CAREFUL'
        elif (current < minimum):
            ret = 'CAREFUL'
    except KeyError:
        return 'DEFAULT'
    log_str = ''
    if self.get_limit_log(stat_name=stat_name, default_action=log):
        log_str = '_LOG'
        glances_logs.add(ret, stat_name.upper(), value)
    self.manage_threshold(stat_name, ret)
    self.manage_action(stat_name, ret.lower(), header, action_key)
    return (ret + log_str)
