Flapping configuration

I’m trying to set up checks that initiate after x number of occurrences and do not reset until y number of occurrences. As an example, I want to alert when CPU utilization exceeds a threshold for 15 occurrences and to reset after 20 occurrences below the warning/critical thresholds.

Unfortunately, what I end up with is that there are no alerts when a threshold is exceeded, however there are RESOLVED alerts when the utilization drops below the thresholds after the correct number of occurrences. My config for the CPU check is:

  { "checks": { "cpu_usage": { "handlers": ["mailer"], "command": "/etc/sensu/plugins/check-cpu.rb -w 80 -c 90", "interval": 120, "occurrences": 15, "low_flap_threshold": 0, "high_flap_threshold": 5, "refresh": 3600, "subscribers": [ "linux" ] } } }

I read this as “alert when CPU stays above threshold for 15x120 = 30 minutes and resolve when the CPU utilization is consistently below the thresholds for 20x120 = 40 minutes”

Am I misinterpreting how the flapping thresholds work?