Several questions about flapping

Hi and welcome!

Why not add the flapping configuration to your temlates? This way you can easily (de-) activate it for all Services and change the thresholds. Why would you encase it in an if clause?

You can’t “see” the calculation it’s doing. The algorithm is rather complicated and is explained more into detail in the Icinga 2 book (sorry, only in German so far).

(affiliate link)

The algorithm takes into account the last check results and weighs them so the more recent a result is the more impact it has on the calculation. You will get a notification about the Service starting (or ending flapping) and while it is still flapping you won’t get any new notification about state changes which is the main reason why flapping was introduced in the first place. It’s for keeping Icinga from spamming with Ok-NotOk-Ok-NotOk mails.

Is that ok for a short answer? I don’t have time for a longer one, so maybe someone else might step in. If you need more detail, let me know I might have more time later or in the next days (no promises)