check filesystem onreboot nostart fails to run monit

Issue #693 resolved
Anonymous created an issue

I have an encrypted filesystem, for which I enter password manually after reboot. That filesystem is described in block check filesystem with onreboot nostart, and it was working well until recent update.

in log

Nov 27 04:17:49 Server monit: Lookup for '/backup' filesystem failed
Nov 27 04:17:49 Server monit: Filesystem '/backup' not mounted

That is obviously violation of logic to not start checking an service (filesystem) if it has "onreboot nostart" in after-reboot startup.

monit-5.25.0, 10.3-RELEASE-p24 FreeBSD amd64

Comments (5)

  1. Tildeslash repo owner

    There was no change in the "onreboot nostart" implementation/logic, please can you send your Monit configuration and log to support@mmonit.com?

  2. Tildeslash repo owner

    thank you for data, we have reproduced the problem.

    The problem is triggered by these tests if the filesystem is not mounted:

    if space free < 50 GB within 3 cycles then alert
    if space free < 10 GB then alert
    

    If absolute space free value is specified, Monit tries to get the block size during configuration parsing to to internally convert the bytes value to blocks count (even if the "onreboot nostart" option is used and the monitoring won't be enabled automatically). If the filesystem is not mounted when monit starts, the parser returns error.

    We'll fix the issue.

    Workaround: Replace the absolute value with percent value (in this case monit doesn't try to get the block size), for example:

    if space free < 3% within 3 cycles then alert
    if space free < 1% then alert
    
  3. Log in to comment