When a counter is reset, don't send a zero because it will look bad on the graphs
    This checks if the zero makes sense or not

def check_metric_can_be_zero(metric_name, metric_value, json_attributes):
    """
    When a counter is reset, don't send a zero because it will look bad on the graphs
    This checks if the zero makes sense or not
    """
    if "last" in metric_name.lower():
        return True
    if not metric_value:
        return False
    try:
        if metric_value == 0 or metric_value == "0" or metric_value == "0.000000" or float(metric_value) == 0.0:
            if not json_attributes or not json_attributes.get('cnt'):
                return False
            if json_attributes.get('cnt') == "0" or json_attributes.get('cnt') == 0:
                return False
    except ValueError:
        return False
    return True