monit does not execute command on file size failure

Issue #451 resolved
Harivardhan Pyaram
created an issue

For some reason monit does not run the exec command on file size failure. This means our logs are not getting rotated and causing unrelated problems.

I am attaching the relevant conf file and the monit.log with very verbose logging enabled.

Comments (2)

  1. Tildeslash repo owner

    Monit 5.16 or alter executes the action on state change only, changelog excerpt:

    New: The exec action is now executed only once, on state change, same way as the alert
    action. The new "repeat" option allows to repeat the exec action after given number of
    cycles if the error persists.  Syntax:
        if <test> then exec <script> repeat every <x> cycles
    If you want to get the old behaviour, use "repeat every 1 cycle". Example:
        if failed port 1234 then exec "/usr/bin/myscript.sh" repeat every 5 cycles
    

    You can use the "repeat" option to repeat logrotate if the error persists.

  2. Log in to comment