$ 0 0 1 and 4 can be achieved through the alert manager using the 'Do not trigger until condition exists for more than' setting. 2 and 3 requires custom SQL