Setting up alerts in Grafana

My condition is to evaluate every 4 minutes, if the maximum value in the 4 minute time series data exceeds threshold value, it has to go to pending state which is 32 minutes, so in 32 minutes every 4 minutes evaluation occurs, each time i have to check maximum value, if at each 4 minute time in pending exceeds threshold, then only i have to get alert, even if one value in 4 minute evaluation of 32 minute pending period does not exceed threshold it shouldn’t have to fire alert. Please provide condition to set alert in grafana, what i have to select reduce, math, classic condition, resample, threshold