Event commands on flapping checks

This forum was archived to /woltlab and is now in read-only mode. Please register a new account on our new community platform.

You can create a thread on the new site and link to an archived thread. This archive is available as knowledge base, safe and secured.

More details here.
  • Hi,


    I have an event command that restarts a service when a certain check is not met.

    I am worried that in some edge cases I have not thought of yet it will trigger too many times in a short interval and I would not like to restart the service in that case.

    Is there a way to set the event to trigger only x times an hour or something on those lines?


    Thanks.

  • Looking at the documentation of Icinga 1.x there is an example taking the check attempt into account.

    I am worried that in some edge cases I have not thought of yet it will trigger too many times in a short interval

    That would mean that the time restarting the service is longer than the time between consecutive checks.

  • No, restarting the service is quick but there are side affects for the service restarts I would like to avoid when restarting it doesn't really fix the root cause.

    Maybe this is a good place to use the service.duration_sec macro?

    The post was edited 1 time, last by tzvikaz ().

  • You need to handle such logic inside the eventhandler script itself. There's the possibility to pass literally any runtime macro from Icinga 2 to the script.