Monit Updates and Release Notes

This page summaries changes made in Monit since version 5.34.0. Please see the commit log for a detailed list of changes and commits leading up to the various releases below. Use the issue tracker to report new issues or feature requests

Version 6.1.0

Released on Nov 18 2026
  • Incompatible change: All outgoing SSL connections now verify the remote host's SSL certificate. The connection fails if the certificate is self-signed. It also fails if the hostname in the certificate does not match the address Monit connects to. If you rely on a self-signed SSL certificate, or if the certificate's hostname does not match the host, you can configure Monit to allow self-signed certificates or to disable certificate verification.
  • Incompatible change: The control file (monitrc) and every file it includes must be saved as UTF-8. Monit reports text that is not valid UTF-8 as an error. Test the control file with monit -t before you restart or reload Monit. To convert a file saved as Latin-1:
    cp monitrc monitrc.old
    iconv -f ISO-8859-1 -t UTF-8 monitrc.old > monitrc
    
  • Incompatible change: The poll time must be between 1 and 3600 seconds. Before, it could be up to a year. A longer poll time in set daemon is now an error in the control file. The -d option has the same limit. The poll time is how long Monit sleeps between cycles. We recommend keeping it at a minute or less. To check a service less often, use the cron-style every statement. Monit then wakes up and checks the service at the scheduled minute. For example, once a day at 03:00:
    check filesystem data with path /data
        every "0 3 * * *"
    
  • New: Each test now has its own event type. Before, many tests shared one, such as "Resource". A failed test then marked every test in its group as failed in monit status and in the web interface. Now only the failed test is highlighted, and the messages say which test failed. A space usage alert now says "Space usage matched limit" instead of "Resource limit matched". The same text is in $EVENT in mail alerts and in MONIT_EVENT for the exec action. Update scripts and mail filters that match the old text. The alert event filter takes the new event types as well as the old keywords. For example:
    set alert foo@bar but not on { cpu, loadavg1m, atime }
    
    An old keyword still covers its whole group. For example, resource also covers space and inode usage. The manual lists the event types under Setting an event filter.
  • New: The link up and link down tests now react only to a change of the link state. They no longer fail on link errors. Use the new link errors test for those. If a network check has no link errors test, Monit sends an alert on link errors. Existing configurations keep working. For example:
    check network eth0 with interface eth0
        if link down then restart
        if link errors for 3 cycles then alert
    
  • New: The runtime page of the web interface has a button to turn debug mode on and off. This makes debugging easier when Monit runs as PID 1, for example in a Docker container. Thanks to Lutz Mader.
  • New: make install now installs the bash completion for the monit command. It goes to <prefix>/share/bash-completion/completions/monit.bash. To install it elsewhere, use the configure option --with-bashcompletiondir=DIR. To leave it out, use --with-bashcompletiondir=no. The bash-completion package 2.12 or later finds the script under any prefix. Older versions look only under /usr/share and /usr/local/share. With another prefix and an older version, copy the script to ~/.local/share/bash-completion/completions/. Or source it from ~/.bashrc.
  • New: Monit as PID 1 in a container now finishes its shutdown within a time limit. On SIGTERM it stops services with their stop programs in dependency order. Then it stops the remaining processes. The limit is 10 seconds by default, the same as Docker's. To give services more time, raise it in monitrc:
    set limits { shutdownTimeout: 30 s }
    
    Give the container the same stop timeout, so the runtime does not kill Monit first. In Docker that is docker stop -t 30. Docker Compose has stop_grace_period, and Kubernetes has terminationGracePeriodSeconds.
  • Fixed: Stray text after a program is now a syntax error. Before, the parser silently added it to the program's arguments. For example, a cron specification without the every keyword became an argument of the stop program above it. An unquoted program is still accepted, but only without arguments. A program with arguments must be quoted. Monit now reports "A program with arguments must be quoted" at the line of the argument. This also catches a Monit keyword used as an argument, as in stop program = /etc/init.d/foo stop. An unquoted program now also works in the form start program = /path. Before, this gave a syntax error.
  • Fixed: A program and its arguments can now be enclosed in single quotes, as in exec '/usr/bin/say "Oh no!"'. This works in every program statement and in check program ... path. Before, single quotes in a start, stop or restart program gave a syntax error. An exec or a check program took the single-quoted text as one program path. Monit could not run that program and only warned "Program does not exist".
  • Fixed: An error in the control file could be reported one or more lines above the actual line.
  • Fixed: An include statement without a file name is now an error. Before, Monit took the first word of the next line as the file name. A failed include is only a warning, so Monit silently ignored that line.
  • Fixed: A service or group name longer than 255 bytes is now an error. This includes M/Monit host groups. Before, a service with a longer name lost its monitoring state when Monit restarted.
  • Fixed: SSL/TLS: A certificate checksum now matches in upper or lower case.
  • Fixed: The HTTP protocol test with a content or checksum check now handles a chunked response with a very large chunk size.
  • Fixed: A program configured with a uid but no gid now runs with that user's groups. A program with a gid but no uid runs with that group only.
  • Fixed: HTTP interface: A login with an unknown user name now takes as long as one with a wrong password.
  • Fixed: HTTP interface: Monit now refuses a request URL with a control character, such as CR or LF.
  • Fixed: HTTP interface: A password stored with a crypt hash the system does not support could crash Monit. The login now fails with an error in the log.
  • Fixed: HTTP interface: The runtime page showed the process id of the Monit daemon as 0. A request for /_monit got "410 Gone" although Monit was running. This was a regression in Monit 6.0.0.
  • Fixed: Monit no longer follows a symbolic link when it writes its pid file.
  • Fixed: The MySQL protocol test now refuses a handshake with an empty salt.
  • Fixed: The RADIUS protocol test now checks every attribute in the response. Before, it checked only the first.
  • Fixed: The RDATE protocol test could fail on 64-bit platforms when nothing was wrong.
  • Fixed: The DNS protocol test now checks the transaction ID and the query count of the answer.
  • Fixed: Network tests now end at their timeout. Before, each signal Monit received during the wait restarted the timeout. Monit gets signals in normal operation, for example when a program it started exits. A test of a host that did not answer could then take far longer than its timeout. A stop request had to wait for it.
  • Fixed: A stop request during start-up could crash Monit. This happened when M/Monit or a cron-style every schedule was set. As PID 1 in a container, Monit then did not stop the services. A reload at that time could make Monit exit. A reload during a slow service test could also leak memory.
  • Fixed: A stop or reload request could wait up to 17 seconds if it came while Monit sent its status to M/Monit.
  • Fixed: The new scheduler flooded the log with "Awakened by User defined signal 1". Monit now logs this message only in debug mode. This was a regression in Monit 6.0.0. Thanks to Lonnie Abelbeck for the patch.
  • Fixed: Issue #1153: Monit did not compile with some older C11 compilers. Thanks to Lutz Mader for the report and the first fix.
  • Fixed: Issue #1154: A rule like if ... for 3 cycles then alert could send a "Succeeded" alert without a failure alert first. This happened when the test recovered before the rule's cycle count was reached. This was a regression in Monit 6.0.0. Thanks to Christos Chatzaras and Lutz Mader for the report and the patches.
  • Fixed: Monit leaked three file descriptors each time it failed to run a program. For example, this happened when the program was not executable.
  • Fixed: The swap paging rates were always zero.
  • Fixed: The checksum-change test now keeps its baseline when Monit restarts.
  • Fixed: With the event queue enabled, several events from one service in the same second overwrote each other. Only one of them was kept.
  • Fixed: A check program could run twice in one cycle and report a false "content changed". This happened when another service depended on it and a restart was triggered.
  • Fixed: Linux: An interface with unknown link speed showed a negative speed instead of "not available". A virtio interface in a VM is one example. When such an interface was idle, Monit reported a false 0% saturation. It now skips the saturation test.
  • Fixed: Linux: Monit did not collect disk I/O statistics for a filesystem on the first block device in /proc/diskstats. Its I/O values stayed empty, and Monit reported no error.
  • Fixed: macOS: Monit did not collect the disk service time for APFS filesystems. The if service time test always passed, and the status showed no service time. On other filesystems the service time was 4.63% off.
  • Fixed: macOS: Monit read the command line of a process with many arguments only in part or not at all. A check process ... matching pattern then did not match such a process.
  • Fixed: Solaris: Monit could crash when it collected system statistics on a host without ZFS or without the kstat interface. The system paging statistics were wrong. On SPARC the boot time and uptime were wrong too.
  • Fixed: OpenBSD: Monit reported the thread count of the wrong process. It also did not calculate the disk write rate of a process.
  • Fixed: GitHub issue #1: A service with depends on was skipped as soon as a test of its parent failed. This happened even when the parent's test used for X cycles and had not reached that count yet. Monit now skips the service only when the parent's failure is confirmed. This was a regression in Monit 6.0.0. Thanks to Lutz Mader.
  • Fixed: GitHub issue #3: Linux: Monit counted the ZFS ARC as used memory. The memory usage of a host with ZFS was then too high. This started in Monit 5.27.0. Thanks to Jeff Honig for the report.
  • Fixed: GitHub issue #4: A deprecation warning or an error in the control file could name the file and line of the next statement. Thanks to hs-kolesik for the report.
  • Plus many minor improvements and fixes.

Version 6.0.0

Released on Jun 15 2026
  • New:The every statement can now reliably be used with minute precision. Like crontab, the every statement will run a service check only once per minute, regardless of poll-cycle time. This means that you can now use checks like this and be sure it runs only one time at the intended time:
    check program weekly_report with path /var/monit/weekly_report.sh
        every "15 8 * * 1"
        if status != 0 then alert
    
    This will run the above weekly_report.sh one time every Monday at 08:15 (or as soon as possible after that time if the validation loop is delayed). Cron matching is asynchronous to the validation loop, ensuring checks run once even if validate takes longer than a minute to complete. This fixes the issue where checks with an every statement could be skipped entirely due to misalignment with poll cycle settings or validation loop delays.
  • New: SSL/TLS: Add support for quantum-resistant cryptography: hybrid ML-KEM key exchange mechanisms with TLS 1.3. Monit must be linked with an SSL library that supports ML-KEM, such as OpenSSL 3.5.x or later, for this functionality to work.
  • New: Added SHA256 checksum support. SHA256 can now be used in addition to MD5 and SHA1 for file integrity monitoring, SSL/TLS certificate verification, HTTP content validation, and MySQL RSA key verification. SHA256 provides stronger cryptographic security than MD5 and SHA1. Supported in the following statements:
    • File checksum: if failed [sha256] checksum
    • SSL certificate: certificate checksum <sha256-hash>
    • MySQL RSA key: rsakey checksum [sha256] <sha256-hash>
    • HTTP content: checksum <sha256-hash> (auto-detected from 64-character length)
    Example:
    check file myfile with path /path/to/file
        if failed sha256 checksum then alert
    
    check host example.com with address example.com
        if failed port 443 protocol https
           certificate checksum = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
        then alert
    
  • New: The file checksum test now uses SHA256 by default, if no hash function is specified (it used to be MD5 by default).
  • New: Issue #1132: Added support for swap monitoring: PAGEIN and PAGEOUT tests in the check system context. It allows one to monitor the system's swap activity and memory pressure. When the system requires more memory, it may begin swapping memory pages in and out of the swap device. The swap device's I/O is significantly slower than RAM access, making it an indicator of the system's memory pressure. A general rule of thumb for swapping activity is:
    0     pages/sec:           Healthy
    1-10  pages/sec:           Minor paging, usually acceptable
    >100  pages/sec sustained: Memory pressure, investigate
    >1000 pages/sec:           Severe thrashing, immediate action needed
    
    Example:
    if pageout > 50 per second for 20 cycles then alert
    if pageout > 100 per second for 10 cycles then alert
    
    Thanks to Lutz Mader for patch.
  • New: Linux: Issue #1136, Issue #42: process memory usage report overcounts the shared library RSS. Monit prefers the PSS (Proportional Set Size) report instead of RSS (Resident Set Size) now. The PSS provides a more accurate measure by fairly dividing shared memory among processes. RSS can be misleading because it overcounts shared memory by adding the entire amount to each process that uses it. PSS gives a more realistic view of both a single process's contribution and the system's total memory footprint. Warning: Monit >= 6.0.0 may thus report significantly lower usage for both "memory" and "total memory" for processes.
  • New: MacOS: Process memory usage report is in line with Activity Monitor now and shows the process' physical memory footprint instead of RSS. It excludes shared memory that's being used by multiple processes (to avoid double-counting).
  • New: The security attribute test now supports regular expressions and negative match, which is useful, for example, in the SELinux context, where a container might consist of random MCS categories. Thanks to Christian Goettsche. Syntax:
    IF SECURITY ATTRIBUTE <"="|"!="|"=~"|"!=~"> <regex> THEN <action>
    
  • New: The check program output in the monit status CLI was limited to 200 characters. The limitation is removed and monit will display up to set limits { programOutput: <size> } characters now. (Default is 512 bytes).
  • New: Illumos build (tested on OmniOS r151054).
  • New: DragonflyBSD build (tested on DragonflyBSD 6.4).
  • Fixed: If a stale pidfile existed at Monit startup, Monit could fail to start. This was especially common in containerized environments like Docker after an ungraceful shutdown. The issue was resolved by improving the startup check that detects whether another Monit daemon is already running. Thanks to Lutz Mader for identifying the problem and providing an initial patch.
  • Fixed: The result of executing the check program command with the every statement is evaluated immediately (in the next cycle). Previously, Monit would wait for a specified number of cycles or until the next cron pattern match before evaluating the program's result.
  • Fixed: Issue #1141: When multiple check program statements were linked with depends on, but the parent test frequency was limited using the every statement, the child copied the parent's test schedule, even if the child did not have its own every statement.
  • Fixed: Wakeup Monit from sleep on SIGUSR1 signal.
  • Fixed: Issue #1129: When the Monit log was set to a device, such as set logfile /dev/stdout (e.g. inside a Docker container), Monit hangs when "View Monit logfile" is used in the Monit HTTP interface. Thanks to Lutz Mader for report and fix.
  • Fixed: Issue #1137: Hostname error in log when fetching status in XML format from the Monit HTTP API via UNIX socket.
  • Fixed: Issue #1142: File descriptor leak on Linux when /proc/PID/attr/current is not accessible due to AppArmor/SELinux restrictions.
  • Fixed: Monit now provides more detailed error reporting when the hostname resolution fails. Previously, when testing a remote host using ping and the host did not resolve in DNS, Monit simply reported "ping failed".
  • Fixed: The MongoDB protocol test did support only MongoDB < 5.1. The protocol test was updated to support the newer MongoDB ping style.
  • Fixed: The service restart counter wasn't reset on reboot, which could cause the restart timeout to falsely trigger when monit had a long polling cycle and the machine was repeatedly rebooted immediately after the first monit cycle.
  • Fixed: When the system had no file descriptors limit, monit displayed confusing statistics in status:
    filedescriptors    4896 [0.0% of 9223372036854775807 limit]
    
  • Fixed: Issue #1144: Monit GUI drops the Strict-Transport-Security header when sending HTTP error responses.
  • Fixed: SSL/TLS: Disable obsoleted CBC ciphers by default.
  • Fixed: Issue #1146: SIP check did not handle IPv6 addresses correctly.
  • Fixed: Issue #1147: The SMTP EHLO response was limited to 256 bytes. Raised the limit to 512 bytes to match RFC 5321 section 4.5.3.1.5.
  • Fixed: When the service had an "existence" test that used the multiple-errors condition (for X cycles), and the service encountered an error, Monit displayed the status as "OK" even though there was no data (e.g., a non-existent process or file).
  • Fixed: When the state of the service changed and the test had a multiple-errors condition (for X cycles), the cycles counter was not reinitialized properly, which could trigger another state change faster than the option settings specified.
  • Fixed: Some tests share the same event type (e.g., the "resource event" is shared by CPU, memory, swap, and load average tests). When multiple errors occurred for the same event type, the last test may have reset the error, and the service would be reported as a false-positive OK.
  • Fixed: The PostgreSQL protocol test could read past the response buffer when parsing an error message from the server if any error field was not properly NUL-terminated within the payload. A malicious or malformed PostgreSQL server could exploit this to crash Monit or to leak stack data into the logs. Thanks to Tristan Madani for finding the bug and sharing the details. Workaround for vulnerable Monit versions < 6.0.0: Replace the if failed port 5432 protocol pgsql then <action> protocol test with a generic TCP connection test: if failed port 5432 then <action>.
  • Changed: The check program output change test now sets the level to warning (yellow), instead of error (red).
  • Changed: MacOS: Monit now utilizes the 64-bit system API to retrieve system memory usage information. The support for 32-bit Macs is deprecated, as the last pure 32-bit Macs were released in 2006. Thanks to Lutz Mader.

Version 5.35.2

Released on May 8 2025
  • Fixed: An issue where Monit with a short poll cycle could skip sleep intervals, run checks continuously, and use CPU excessively when using numerous "check program" tests.

Version 5.35.1

Released on Apr 29 2025
  • Fixed: Issue #1127: Monit may crash when check program is used.

Version 5.35.0

Released on Apr 10 2025
  • New: Monit has added proper init capabilities that make it an excellent choice for running as PID 1 (init) in containers. Monit handles both init responsibilities and service monitoring in one lightweight package. Read more about Monit as init replacement in containers.
  • New: Add the following headers to email alerts, to prevent out-of-office autoresponders in Exchange, Outlook, Office365, Gmail:
    X-Auto-Response-Suppress: All
    Precedence: Bulk
    
  • New: When monit aborts (e.g. due to assert), print a backtrace.
  • Fixed: Monit may hang on exit, if a program executed by check program was pending while monit tried to quit (regression from Monit 5.34.1).
  • Fixed: Issue #484: The pidfile based process check may not work properly on platforms that assign PID to threads (LWPs), such as Linux. When the process with the given PID stopped, but the same PID was assigned to the LWP, Monit reported the process as running (which is wrong) and logged the following error:
    failed to get service data
    The service status displayed the process as OK but showed no process statistics.
  • Fixed: When the pidfile was updated (e.g. process restarted), Monit was still monitoring the previous PID. If the PID was reassigned to different process or thread (LWP), Monit wasn't able to detect that the process is not running.
  • Fixed: Issue #1115: Service checks may sporadically hang if the PID is recycled by the system quickly, e.g. due to PID randomization (regression from Monit 5.34.1).
  • Fixed: Issue #1121: The "set mailserver" timeout option allowed to only increase the network timeout. Values lower than 30 seconds were ignored.
  • Fixed: Issue #1122: Monit hangs with high CPU usage if the set daemon <seconds> is set to >= 2148 seconds.
  • Fixed: Issue #1126: Monit with LibreSSL: The secure connection shutdown may hog the CPU for up to connection timeout (5s by default).
  • Fixed: Monit HTTP interface didn't parse the password file (regression from monit 5.34.4). Thanks to Francisco Javier Felix Belmonte.
  • Fixed: MacOS: When "check network" is used, but no network interfaces are found, monit terminates with AssertException: nbytes > 0 raised in Mem_calloc
  • Fixed: The loadavg test in the process check context didn't work. Error like this was logged by monit each time the test was executed:
    'myservice' error -- unknown resource ID: [5]
  • Fixed: MacOS + DragonflyBSD + FreeBSD + NetBSD + OpenBSD: If there are no mounted filesystems and a check filesystem is used, monit would terminate with AssertException: count > 0 raised in Mem_calloc
  • Fixed: FreeBSD + OpenBSD + NetBSD: Detect presence of backtrace() function during compilation (used in monit -vv mode to print backtrace)
  • Fixed: MacOS: Monit may stop handling signals (SIGCHLD for children, SIGTERM to exit, SIGHUP for reload, SIGUSR1 for wakeup)
  • Fixed: If Monit detects syntax errors in the configuration file, log an error message prior to exiting the program.
  • Fixed: Allow to stop Monit if it is in the middle of secure connection with read/write retries.

Version 5.34.4

Released on Jan 11 2025
  • Fixed: If the Monit configuration file contains a string with unbalanced escape sequences, Monit may crash upon startup.
  • Fixed: If the password in the set mmonit URL contains only binary characters, syntax check passed (-t), but Monit aborts after start and reports following error:
    AssertException: n >= 0
     raised in Str_ndup at src/util/Str.c:315
    Aborted
    
  • Fixed: If the every <cron> statement contained a syntax error, syntax check passed (-t), but Monit aborts after start and reports following error:
    AssertException: n < 5 && n >= 0
     raised in Time_incron at src/system/Time.c:1566
    Aborted
    
  • Fixed: If the timeout option value was set to 0, the syntax check was successful (-t), but Monit aborts after starting and reports the following error:
    AssertException: timeout > 0
     raised in Socket_create at src/net/socket.c:319
    Aborted
    
  • Fixed: The set syslog statement's facility option did not permit the specification of the log_user. Thanks to Lutz Mader for report.
  • Fixed: Double interpretation of format strings during RETHROW

Version 5.34.3

Released on Dec 10 2024
  • Fixed: If the ping statement did not explicitly specify an outgoing address but a previous ping statement did, the same address was shared by both statements.
  • Fixed: Monit may crash upon stopping if the ping statement is used in conjunction with the address option.
  • Fixed: If a directory is set in the allow option of the set httpd statement, instead of a file or string, Monit hangs on startup.

Version 5.34.2

Released on Oct 11 2024
  • Fixed: The network protocol test may occasionally fail with a "Poll failed: Interrupted system call" error.

Version 5.34.1

Released on Oct 4 2024
  • Fixed: The check program now avoids leaving zombie processes between cycles.

Version 5.34.0

Released on May 29 2024
  • New: Added the timeout option to the exec action. It can be set either globally (in the set limit statement using the execTimeout option) or locally (using the timeout <number> seconds in the exec action). The default timeout is 0 (no limit), to keep the original behaviour. Thanks to Lutz Mader.
  • New: Issue #1074: Added a hardlink test to file, directory and fifo checks. Thanks to Lutz Mader. Example:
    check directory upload with path /data/upload
        if hardlink > 32000 then alert
    
  • New: Issue #1070: Added the system boot time and uptime to the XML interface. Thanks to Lutz Mader.
  • New: Added support to add Monit to M/Monit hostgroup (requires M/Monit 4.2.2 or later). Example:
    set mmonit
        https://monit:mypassword@mmonit.foo.bar:8443/collector
        with hostgroups [ Oslo, "Mail servers" ]
    
  • New: Add support for checking the output of a program for changes. This can be used to alert on changes of system properties, e.g. ip route or udisksctl status. Thanks to Christian Goettsche. Example:
    check program myscript with path /usr/local/bin/myscript.sh
        if content changed then alert
        if content not changed then alert else ignore
    
  • New: Implemented ignore functionality within the test success action, enabling the suppression of alerts when the check returns to a successful state. Thanks to Christian Goettsche.
  • New: Set the header X-Content-Type-Options to prevent MIME type sniffing. Thanks to Christian Goettsche.
  • New: Added support for debugging TLS/SSL connections with Wireshark. It is now possible to set the SSLKEYLOGFILE=<path> environment variable when starting Monit, to log the master secret to a file, which can be used by Wireshark in "Settings -> Protocols -> TLS -> (Pre)-Master-Secret log filename". Note: The SSLKEYLOGFILE functionality is enabled only in the monit debug mode (when monit was started with the -v option).
  • Fixed: Issue #1082: Wrong error message for the uptime test. Thanks to Lutz Mader.
  • Fixed: Disable SSL session renegotiation in the Monit HTTP interface (CVE-2011-1473).
  • Fixed: Monit reported wrong number of CPUs in the VMWare virtual host in Debian 12.x
  • Fixed: Issue #1086: The HTTP protocol test may return false error HTTP error: invalid chunk size if the HTTP response contained header with more then 511 bytes. We have increased the limit to 8192 bytes per header and will report response header exceeded maximum size error if the HTTP response contains longer header.
  • Fixed: When the monit ID is generated in first start and the system is shut down before the file was stored to the filesystem, an empty monitid file may be created. Thanks to Alexander Dahl for fix.
  • Fixed: The SSL connection can be sporadically interrupted.
  • Fixed: Issue #1101: Updated configuration examples for PAM in the Monit manual. Thanks to Lutz Mader.
  • Fixed: The network test was failing on WSL (Windows subsystem for Linux).
  • Fixed: Make network interface speed statistics optional (monit used to report link failure when statistics were not available) and do not report/check if statistics are not available.