5.27.0 fails on FreeBSD 11.4

Issue #914 closed
Remko Catersels created an issue

Monit 5.27.0 appears to have introduced a problem on FreeBSD 11.4:

# monit stop apache
/usr/local/etc/monitrc:135: The CPU I/O wait usage statistics is not available on this system

The ‘offending’ bit of monitrc (I changed the hostname to *.example.com):

  check system webserver.example.com
    if loadavg (1min) > 15 for 3 cycles then alert
    if loadavg (5min) > 12 for 3 cycles then alert
    if memory usage > 90% then alert
    if cpu usage (user) > 80% then alert
    if cpu usage (system) > 60% then alert
    if cpu usage (wait) > 50% then alert

The changelog indicates lot of changes regarding CPU statistics so I suspect a bug was introduced. If I revert back to 5.26.0 it works as expected.

Comments (10)

  1. Remko Catersels reporter

    It does support the CPU statistics and load averages. It used to support those just fine. Look at the configuration snippet, I’m not looking at CPU I/O wait statistics.

  2. Tildeslash repo owner

    The warning is about the following line in your configuration:

    if cpu usage (wait) > 50% then alert

    This line had no effect on FreeBSD even for monit <= 5.26.0 as there is no way how you can get the CPU I/O wait statistics from FreeBSD kernel.

    The only thing that Monit 5.27.0 added is a warning to let the user know that this particular monit statement has no effect on given platform (FreeBSD in this case).

  3. Remko Catersels reporter

    Oh, duh. Completely overlooked that one. In my defense the indicated line number in the warning pointed to the cpu usage (user) line.

  4. Log in to comment