Up to [cvs.NetBSD.org] / pkgsrc / sysutils / monit
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
monit: Update to 6.0.0
pkgsrc changes:
- Enable for DragonflyBSD, according the changelog it was tested on
DragonflyBSD 6.4 (NOTE: I have not tested it in pkgsrc though!)
Changes:
- 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.
monit: Update to 5.35.2
Changes:
Version 5.35.2
Fixed: Monit may skip the sleep altogether and perform checks in a
tight loop when many "check program" tests are used in conjunction with
the short poll cycle.
Version 5.35.1
Fixed: Issue #1127: Monit may crash when "check program" is used.
Version 5.35.0
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 statictics.
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 sporadicaly 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 then 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.
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.
Version 5.34.4
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
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 file or string, Monit hangs on start.
Version 5.34.2
Fixed: Network protocol test may sporadically fail with "Poll failed:
Interrupted system call" error.
Version 5.34.1
Fixed: The "check program" no longer keeps the zombie process between
cycles.
Version 5.34.0
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. 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.
*: remove Interix support
*: remove incomplete BSD/OS support As proposed on tech-pkg.
monit: Install documentation under share/doc Most packages uses share/doc (without any trailing "s"), be consistent. PKGREVISION++
*: bump for openssl 3
monit: Update to 5.33.0 Changes: 5.33.0 ------ - New: Added click-jacking protection headers to Monit HTTP GUI (the SAMEORIGIN iframe is allowed). - Fixed: Issue #1035: If the start, stop or restart program statement contains the equal sign, which is not followed by a space character, the configuration is not parsed correctly. - Fixed: Issue #1047: If the MariaDB server doesn't allow access to the host, from which Monit test is running, Monit reported: Invalid handshake packet sequence id -- not MySQL protocol. - Fixed: Add the missing responsetime option to the ping test.
monit: Update to 5.32.0
Changes:
5.32.0
------
* Fixed: Issue #1028: If the Monit statefile was removed, the monit start
<service> action for services with onreboot nostart option started the
service, but did not enable monitoring of said service. The same problem
occurred if a new onreboot nostart service was added, even if the statefile
did exist.
* Fixed: Issue #1029: The generic protocol test truncated received data if
the response contained zeros.
* Fixed: PAM authentication: Users with a valid password for a disabled
account could still login to Monit. Thanks to Youssef Rebahi-Gilbert.
* Fixed: The Monit HTTP interface could be blocked by sending a request with
an infinite stream of HTTP headers. Thanks to Youssef Rebahi-Gilbert for
report.
5.31.0
------
* New: Issue #1021: Add support for Linux OpenZFS 2.x I/O statistics.
* New: Issue #555: Add support for FreeBSD ZFS I/O statistics for FreeBSD
12.x or later.
* Fixed: Issue #1025: If Monit 5.30.0 CLI action was executed for a
non-existent service name, the error message was not reported properly.
Thanks to Lutz Mader for fix.
* Fixed: Issue #1026: If Monit reload was requested during the optional start
delay interval, Monit still waited for the delay to pass and performed one
test cycle with the old configuration, before the reload was performed.
Monit will reload the configuration immediately now.
5.30.0
------
* New: Add a read-only option to the set httpd statement. The option can be
used on the TCP socket, the unix socket, or both. Example for setting the
TCP socket in the read-only mode (for connections from other hosts) and the
unix socket in the read-write mode (for local Monit CLI actions, like
service restart, status, etc.):
set httpd
port 2812
read-only
allow 192.168.1.0/24
unixsocket /run/monit.socket
Thanks to Christian Goettsche for contributing this feature.
* Changed: Issue #1011: The include statement was limited to 512 files,
increase the limit to 1024 files.
* Fixed: The disk read and write bytes didn't show up in M/Monit for Monit
5.27.0 or later.
* Fixed: Issue #998: Monit 5.29.0 may fail to compile on platforms without
the monotonic clock support. Thanks to Lutz Mader.
* Fixed: Issue #1002: 32-bit Linux machines with more then 4GB of RAM
reported wrong system memory size and swap size values.
* Fixed: Issue #1005: When the port statement was used with the generic
protocol test and the target server returned zeros in response, Monit >=
5.20.0 may crash.
* Fixed: Issue #1009: When one executes an action via the Monit HTML GUI
(uses a POST request), the Monit HTTP server will redirect the browser back
to the base URL, so the browser won't perform the POST request again on an
automatic page refresh, which is performed to poll for status changes.
* Fixed: Issue #1015: The set httpd statement supports only one address
option. Display warning if multiple address options are used.
5.29.0
------
* New: Issue #715: The PostgreSQL protocol test has been improved and now
supports authentication with username, password and database when testing
connection. Example:
if failed port 5432
protocol pgsql username "username" password "12345" database "test"
then alert
Previous Monit versions used hardcoded credentials when testing connection
to postgresql (user=root and database=root). This could trigger thousands
of messages like this in the postgresql log:
root@root FATAL: password authentication failed for user "root"
root@root DETAIL: Role "root" does not exist.
Note: Monit will continue to use the hardcoded credentials (for backward
compatibility) unless username and password are set.
* New: Issue #973: You can now test program output using a regular
expression. Syntax:
IF CONTENT [!]= <regex> THEN action
Example:
check program disk0_smart with path "/usr/sbin/nvme smart-log /dev/nvme0"
if content != "critical_warning[ ]+: 0" then alert
* New: Issue #974: Monit CLI: Added support for the -g (group) option to the
report command. Example:
monit -g database report
* Fixed: Issue #991 (Monit 5.28.1 regression): MacOS: Monit didn't compile on
MacOS 10.13 or older. Thanks to Lutz Mader.
* Fixed: Issue #994 (Monit 5.28.1 regression): The check program statement
with every did not work properly.
* Fixed: Issue #995: Monit start delay was vulnerable to time jumps when
Monit is waiting for the delay to pass. Thanks to Daniel Crowe.
* Fixed: Issue #975: Monit CLI: Monit did not report a warning if -s, -p, -l,
-g or -c command-line options were specified multiple times and silently
used the last value only. Monit will generate a warning now.
* Fixed: Issue #972: Monit GUI: The log view had no size limit when reading
the Monit log file and could block the browser if the log file was large.
* Fixed: Issue #955: If more than one every statement is used in a
check-service context only the last value is (silently) used. We now report
a warning in this case.
5.28.1
------
* New: Issue #979: If filesystem mount flags changed, show both old and new
value. Originally only the new value was reported.
* Fixed: Issue #960: The memory usage may report wrong value if system memory
size changed after Monit start. The problem was frequent on KVM/LXC
containers where MemTotal is dynamicaly updated.
* Fixed: Issue #965: Monit CLI: if a custom configuration file was used with
the -c option, and the file cannot be read by Monit, an AssertException was
thrown. Monit will report normal error instead of the exception now.
* Fixed: Issue #966: Monit CLI: The service name pattern was changed to
case-sensitive in Monit 5.28.0. Revert the behaviour back to
case-insensitive.
* Fixed: Issue #971: The LINK UP and LINK DOWN tests now support short form
of the optional ELSE condition, in addition to the verbose ELSE IF
<SUCCEEDED|FAILED> form.
* Fixed: Issue #976: The space free test recovery always reported value in
percent, regardless of the test setting. If the test uses absolute limit,
Monit will report absolute space usage now.
* Fixed: Issue #986: Services checks with custom schedule (the EVERY
statement) did set the data collection timestamp even if the monitoring was
skipped in the given cycle. The timestamp is now updated only when the
check was performed.
* Fixed: Issue #990: Monit built with libressl may crash during verification
of the expired SSL certificate.
* Fixed: Issue #968: Systemd and upstart templates: templates used to set the
path to the configuration file in the sysconfdir, which is optionally set
via the configure script during the compilation. The path wasn't fully
expanded in the template though, so it was invalid. The template doesn't
specify the explicit path now and lets Monit search for the configuration
file in all supported locations (including the sysconfdir).
* Changed: Issue #984: The permission check of the SSL PEM key file allows
group read permissions now (originally Monit enforced that the file is
readable only by the file owner).
5.28.0
------
* Deprecated: Monit IF FAILED LINK test was renamed to IF LINK DOWN. The old
syntax is deprecated, but still works for backward compatibility.
* New: Added IF LINK UP network interface test, which allows to monitor
network interface that is by default down, and trigger action, when the
interface is enabled. Example:
if link up then "/usr/bin/monit start backup"
Notes: When link up test is used, the link errors tests are ignored, as
these tests share the same event type and would reset the status. Also,
mixing link up and link down in the same check network is not supported.
* New: Monit can now watch offline TCP/UDP ports and perform action on
successful connection. It can be used as a security check, e.g. if a
service like mysql should not be publicly available, or to perform custom
actions to initialize the service that depends on the one that was just
started. Thanks to Christian Goettsche for patch. Example:
if succeeded port 443 protocol https then exec "/bin/monit start myclient"
if succeeded host example.org port 3306 protocol mysql then alert
* New: Monit can watch unix sockets that doesn't exist or are offline and
perform action on successful connection. Example:
if succeeded unixsocket /var/run/mysql.sock protocol mysql then exec "/bin/myscript.sh initdb"
* New: Monit can ping hosts that are supposed to be offline and perform
action when they become available. Example:
if succeeded ping then alert
* New: Issue #915: Add support for sevice name regular expressions in monit
CLI status, summary, start, stop, restart, unmonitor, monitor commands.
Examples:
monit status myservice # exact match
monit status "data.*" # pattern which will match all services whos name contain "data" substring
* New: Issue #718: Add support for response time monitoring to TCP/UDP ports,
unix sockets and ping. Example for ping and port test:
if failed ping responsetime < 50 ms then alert
if failed port 443 protocol https and responsetime < 50 ms then alert
if failed port 443 protocol https and responsetime < 50 ms then alert
* Fixed: Issue #961: If a service depends on some other service, which is
member of the same service group, the service group restart would restart
the child service twice.
* Fixed: Minor memory leak when uptime test is used an monit is reloaded.
5.27.2
------
* Fixed: Issue #931. The "if does exist" test with unmonitor or stop action
did not work properly
* Fixed: Issue #937: If the filesystem check uses mountpoint instead of
device and multiple devices are defined for the same filesystem with
mismatch between /etc/mtab and device name in path, Monit reported error
and disk activity was not reported.
* Fixed: Issue #948. Cookie validation problem, Invalid CSRF Token, if the
request was more then 1024 bytes. Increased request size to 8kB.
* Fixed: Disk activity statistics if procfs fallback was used instead of
sysfs
* Fixed: LXC container: Monit could ignore the "start delay" option of the
set daemon statement when the container was rebooted, but not the host (the
LXC container's boot time is not virtualized and inherited from the host).
* Changed: Monit in debug mode no longer logs open errors about procfs /proc/
/io and /proc//fd if monit is not running as root. These errors are common
as linux doesn't allow to read such files if the process belongs to a
different user. These errors are now only logged in extra verbose mode (-vv
option).
5.27.1
------
* Fixed: Issue #932. Require that the program in a 'check program' statement
exist on Monit startup.
* Fixed: Issue #916: Linux: Monit procmatch failed to show all matching
processes if a non-root user ran Monit. Thanks to Lutz Mader for fix.
* Fixed: Linux: The CAP_SYS_RESOURCE capability was needed to be able to
monitor filedescriptors usage of other processes if Monit was not started
as root. Thanks to Christian Goettsche for report.
* Fixed: Issue #920: On AIX, NetBSD, Solaris, Monit 5.27.0 logged "Cannot
test filesdescriptors usage as the statistics is not available on this
system" every cycle even if no filedescriptors test was used in Monit's
configuration.
* Fixed: Issue #926: Linux: Remove trailing white space from collected
process name
* Fixed: Issue #928: Fixed a race condition in Monit's HTTP interface on
reload when SIGHUP were sent many times to the Monit process . Thanks to
Andy Spitzer for patch.
* Fixed: Improved cross-compile support. Thanks to Christian Goettsche and
Helmut Grohne for patch.
* Fixed: Monit could crash when sending heartbeat status to M/Monit.
* Fixed: If SSL certificate verification failed and certificate valid days
test was enabled, Monit could report the following false positive:
certificate expiry in 0 days matches check limit
* Changed: Use ISO 8601 format timestamp in log files
5.27.0
------
* New: The SSL version: auto now defaults to TLSv1.2 and TLSv1.3 only. If you
need to enable TLSv1.0 or TLSv1.1, you have to explicitly enable it via the
SSL option, example:
set ssl {
version: tlsv11
}
* New: Support for MySQL TLS encryption. Example:
if failed port 3306 protocol mysqls then alert
* New: Issue #839: Support for MySQL 8.x default authentication method,
caching_sha2_password. If unsecure (non-TLS) connection is used, it is also
possible to verify the server's RSA key checksum to protect against
man-in-the-middle attacks. Example:
check host mymachine with address 127.0.0.1
if failed
port 3306
protocol mysql
username monit
password mypassword123
rsakey checksum 29e512c06275a1b3f4617f8cb9ca583d642386fe
then alert
* New: The username in the mysql protocol test was limited to 16 bytes, this
limit was removed.
* New: Linux: Support for monitoring a process's filedescriptor usage. Thanks
to Marcel Baur and Lutz Mader. Example:
check process myproc with pidfile /var/run/myproc.pid
if filedescriptors >= 90% then alert
if filedescriptors >= 99% then restart
if total filedescriptors > 5000 then alert
* New: Linux, OpenBSD, FreeBSD, DragonflyBSD, MacOS: Added support for
monitoring of system-wide filedescriptors usage. Example:
check system $HOST
if filedescriptors >= 90% then alert
* New: You can now set a list of allowed TLS protocols (originally only one
was allowed). Also added an option to exclude protocols (put - in front of
the protocol name to disable it). Exclude list example:
set ssl {
version: auto -sslv2 -sslv3 -tlsv1 -tlsv11
}
* New: Optionally split certificate chain and key for the Monit HTTPS
interface. Thanks to Lutz Mader for patch. (The original pemfile with all
certificates in one pem file is still supported). Example:
set httpd
port 2812
with ssl {
pemchain: /etc/ssl/certs/monit.chain.pem
pemkey: /etc/ssl/certs/monit.key.pem
}
allow myuser:mypassword
* New: Linux: Enable monitoring of per-process disk read and write I/O
operations. Example:
check process foobar matching "myprocess"
if disk read activity > 500 operations/s then alert
if disk write activity > 500 operations/s then alert
* New: Linux: Added generic per-process I/O activity monitoring. Example:
if read activity > 1 mb/s then alert
if write activity > 1 mb/s then alert
* New: Issue #889: Linux: monitor detailed CPU statistics for nice, hardirq,
softirq, steal, guest, guestnice. The statistics for nice was originally
included in the cpu (user) statistics, but it now has its own counter.
* New: FreeBSD, OpenBSD, NetBSD, DragonflyBSD MacOS: Added CPU nice and
interrupt usage statistics.
* New: Issue #877: Linux: Added support for VxFS filesystem statistics.
Thanks to Lutz Mader for patch.
* New: Issue #894: Added year to the timestamp when monit logs to its own log
file.
* New: Issue #908: Add STARTTLS support to the IMAPS protocol test on port
143. Example:
if failed port 143 protocol imaps then alert
* Fixed: Issue #519: Monit could crash if a file check with restart on
content match was used and this file had dependant services.
* Fixed: Issue #867: If Monit was linked with musl libc, it could crash when
executing programs. Thanks to Rich Felker for report.
* Fixed: Monit incorrectly added CPU wait% to system CPU usage (the CPU is
idle when it's in the wait state, waiting for the I/O to complete).
* Fixed: The per-process I/O statistics on Linux, AIX, DragonflyBSD, NetBSD
and Solaris always displayed 0 activity.
* Fixed: Issue #843: Linux: Monit reported wrong memory usage in LXC
container if the ZFS filesystem was used. Monit now use MemAvailable on
Linux when calculating memory usage for more accurate statistics. Thanks to
Joe LeVeque for patch.
* Fixed: Issue #831: The HTTP protocol test returned unknown transfer
encoding HTTP error if either the content or checksum test was used and the
HTTP server didn't set the Content-Length header nor used chunked transfer
encoding.
* Fixed: Issue #880: If Monit was linked with AddresSanitizer, it could crash
when it generates an MD5 hash. Thanks to Lutz Mader for patch.
* Fixed: Issue #879: The HTML interface didn't escape strings that are part
of Monit's configuration file. Thanks to Hanno Boeck for report.
* Fixed: Issue #872: Monit's procmatch table can now display pids with up to
8 digits. Previously, pids where truncated after 5 digist.
* Fixed: Issue #891: The repeat option to an action was limited to 256
cycles.
* Fixed: Issue #851: Linux and AIX: The length of the string that describes
the process name and its arguments was limited to 4kB, so monit procmatch
might not find the process if the string was longer and unique after 4Kb.
This limit has been removed on Linux and raised on AIX to 8kB.
* Fixed: Issue #840: Network check: superfluous alerts if link is down.
Thanks to Lonnie Abelbeck.
* Fixed: MacOS: Only the first 16 characters of the process name was
displayed for privileged processes, so the pattern based process check and
Monit's procmatch could miss some processes.
* Fixed: Issue #886: Monit's command-line options are now position
independent.
* Fixed: If Monit is linked with AddresSanitizer and a custom configuration
file was passed via the -c option, monit could crash.
* Fixed: MQTT protocol test.
* Fixed: Issue #907: The onreboot nostart had no effect when a service was
newly added to Monit's configuration or the statefile was removed.
* Fixed: The PostgreSQL test was flapping with the following error if
connection via unix socket was used: PGSQL: connection terminator write
error -- Broken pipe
* Plus many more internal fixes and improvements
monit: needs pam
*: Recursive revision bump for openssl 1.1.1.
monit: Update to 5.26.0 - Fix build with OpenSSL 1.1 - Fix CVE-2016-7067 - ... many others, see https://mmonit.com/monit/changes/
Needs _KERNTYPES on NetBSD.
Bump PKGREVISION for security/openssl ABI bump.
Use BROKEN_ON_PLATFORM for "no platform specific code yet"
Updated monit to version 5.8
Version 5.8
New: Monit no longer purge the environment for sub-processes
New: Add command line option to view Monit ID (-i/--id)
New: Add command line option to reset Monit ID (-r/--resetid)
New: Add client support for using TLS version 1.1 and 1.2. A recent
1.x version of OpenSSL is required and of course that the server
speaks this TLS version. At this time, not many does. Example:
if failed port 443 with type TCPSSL tlsv11 protocol http then alert
New: Process UID, EUID and GID tests. Allows to test if the
process is running as a given user. Example:
check process syslog with pidfile /var/run/rsyslogd.pid
if failed uid "syslog" then alert
if failed euid "syslog" then alert
if failed gid "syslog" then alert
New: Add WebSocket protocol test support for port check. Example:
check host websocket.org with address "echo.websocket.org"
if failed
port 80 protocol websocket
host "echo.websocket.org"
request "/"
origin "http://www.websocket.com"
version 13
then alert
New: Simplified HTTP protocol test to allow testing content without
creating an URL object. It is now possible to say in a more natural way,
check host mmonit.com with address mmonit.com
if failed
port 80 protocol http
and request /monit/ with content = "Monit 5.7"
then alert
meaning that if the page mmonit.com/monit does not contain the text
"Monit 5.7" then the test will fail. To reverse the test, i.e. to test
that the page should not contain a specific string simply use '!='
instead, like,
if failed
port 80 protocol http
with content != "Nagios"
then alert
Remember also that the string to test can be a regular expression
New: The HTTP protocol test now support testing the HTTP status code
returned by the server by using "status <operator> <number>".
Backward compatible defaults (return error if status >= 400):
if failed
port 80 protocol http
and status < 400
then alert
Return error if a page DOES exist (for success 404 is expected):
if failed
port 80 protocol http
request "/non/existent.php"
status = 404
then alert
Fixed: Unix Socket test now use the communication type (TCP or UDP)
specified in port statement. Previously TCP was always used.
Fixed: Improved test to check if a socket was connected. Since we use
non-blocking connect, we now poll a few ms to avoid "connection failed,
XXX is not ready for i|o" errors which could occur, especially on high
latency networks or long distance connect.
Fixed: Simplified if-statements reported in UI
Fixed: Ignore lines starting with '#' in an 'allow htpasswd' file
statement. Thanks to Michael Bakker for reporting the issue
Fixed: Show service restart program on Monit startup in debug mode.
Thanks to Michael Bakker for reporting the issue
Version 5.7
New: Merged https://bitbucket.org/tildeslash/monit/pull-request/1/
from Philippe Kueck:
1) Handle sockets (unix domain) as regular files when checking timestamp.
2) Use mysql 4.1 protocol in MySQL check, required for checking mysql-proxy
3) Skip connection checks during startup timeout.
New: Arguments added to 'check program'. Arguments are whitespace
separated strings. For instance:
check program list-files with path "/bin/ls -l -r -t /tmp"
if status != 0 then alert
New: Implemented restart as an optional service action. When Monit
is called to restart a service, it previously called the stop
program registered with the service and then the start program.
Now, if a restart program is registred with the service, this
will be called instead, otherwise Monit fall back to its old
behaviour. Example:
check process apache with pidfile /var/run/httpd.pid
start = "/usr/sbin/apachectl start"
stop = "/usr/sbin/apachectl stop"
restart = "/usr/sbin/apachectl restart" <- New
New: Improved communication with M/Monit. Thanks to Hippo Lin. For
scalability purpose, this Monit version should only be used with
M/Monit version 3.1 or later.
BUGFIXES:
* Monit stopped if an error occurred during MTA connection close.
* Make the Memcache protocol test faster.
* Solaris zone: fix system memory usage report.
* Use chiper list with SSL server instead of relying on default
Recursive PKGREVISION bump for OpenSSL API version bump.
fixes MASTER_SITES and HOMEPAGE. noticed by wiz@.
Update monit to 5.6.
PR pkg/48465 by ISIHARA Takanori.
Version 5.6
IMPROVEMENTS:
* SMTP AUTH LOGIN support added (MS Exchange SMTP authentication
should now work).
* favicon.ico added to the HTTP interface.
BUGFIXES:
* If an undefined checksum test was used and the file did not exist
on Monit start, Monit would return an error.
* If the configuration file ended with a comment but with no trailing LF
character, Monit would return syntax error.
* If a service timed out after too many restarts and alert was used as
the action, then the Timeout flag remained set even if the service
recovered.
* SmartOS zone system memory usage report fix.
* Escape mail messages properly for sending via SMTP.
* Escape XML messages properly.
* Compilation: fix the configure script to support default compiler
paths when searching for OpenSSL (fixes library search on multi-
architecture platforms like Debian and Ubuntu).
Version 5.5.1
IMPROVEMENTS:
* Info and debug messages are no longer sent to stderr, only to stdout.
Thanks to Sergey Kirpitchev for initial patch.
* Improved output from 'check program', If the program returns an error
message, include only that message in alert $DESCRIPTION so users can
compose their own alert format. If program provided no output on
error, use a default message.
* Improved "check system", $HOST can now be used as a service name.
$HOST will expand to the system hostname. Example: check system $HOST
BUGFIXES:
* Fixed "Unable to read magic" which was reported on first Monit start.
Version 5.5
IMPROVEMENTS:
* check program:
- Multiple exit values can be tested within single program check
- Exit value test supports multiple cycles option ("for X cycles")
- If exit value test matches and the stderr has no data, try stdout
Example syntax:
check program mytest with path "/usr/bin/mytest.sh" with timeout 1000 seconds
if status == 2 then exec "/usr/local/bin/fix_script.sh"
if status == 2 for 6 cycles then unmonitor
if status == 10 then alert
* Renamed mail header (message-id and mime-version) to prevent
triggering spam check of capitalization. Thanks to Ryan Lee
for tips.
* The 'check system <name>' statement sets the system hostname in mail
alerts and initial hostname in M/Monit.
* Increase the default mailserver timeout to 30 seconds.
* Add support for OpenBSD 5.x
BUGFIXES:
* Fix the rare hung on linux which may occur during program execution.
Thanks to Nick Upson for report.
* In the case that the process start/restart execution failed,
monit kept "Execution failed" flag even if the process was
recovered later (for example it was starting slowly or manually
recovered).
* Fix the mail alert (strict SMTP implementation) to pass
MTA-side sanity checks like postscreen. Thanks to Len Conrad
for report.
* The -t option tests the configuration file syntax even if the
file permissions are wrong. Thanks to Adam Nielsen for report.
* Do not display the default non-existence test for the check
program (not applicable in the check program context).
Version 5.4
IMPROVEMENTS:
* New process uptime test added. Allows to do some action in
the case that the process uptime matches the given limit.
For example to restart the process once per 3 days:
if uptime > 3 days then restart
* Linux uCLibc support: use internal getloadavg implementation
in the case that the system libc doesn't implement it.
BUGFIXES:
* The monit hostname will fallback to plain machine's hostname if the
lookup for FQDN hostname didn't found matching entry. The problem
was, that based on the order in the /etc/hosts the FQDN lookup
returned sometimes 'localhost' instead of the FQDN hostname.
* The CPU usage for multi-threaded processes on multi-core machine was
reported incorrectly in the case that the process used more CPU
resources then equivalent to one core. Thanks to Tom Pepper for patch.
* The content match test now sends one event per cycle and pattern.
Even if there are multiple lines matching the same pattern, only
one event will be generated. Also the event rate is fixed now, so
it is possible to require match for X cycles before generating the
event.
* The /proc/ files content match test was skipped, as the file size on
the procfs is 0, so monit supposed that there is no content to read.
* FreeBSD: If the monitored process had children with multiple threads,
the total memory usage was reported incorrectly. Thanks to Phil Kulin
for reporting the problem.
* Allow reading status and perform Monit actions when using client SSL
certificate. Previously, if Monit http server was setup to use ssl
and a client cert, status and action failed. Thanks to Markus Linnala
for initial patch.
* When the process is starting/stopping, do the process state check more
effectively to not stress the low power devices with aggresive polling.
Thanks to Thomas Petazzoni for initial patch.
* Make the process start/stop wait resistant to large time changes.
* Compilation: If PAM is enabled but the PAM headers or library are not
found by the configure script, it will report error.
* Cross-compilation: the configure checks the setjmp and vsnprintf with
test program which usually cannot be executed when cross-compiling
for other architecture. The configure script now takes the following
arguments which allow to specify whether the setjmp works on this
platform and whether the vsnprintf is C99 compliant. Thanks to
Thomas Petazzoni for patch.
./configure \
libmonit_cv_setjmp_available=[yes|no] \
libmonit_cv_vsnprintf_c99_conformant=[yes|no]
* Manual page language fixes. Thanks to Jonathan Boulle for patch.
Version 5.3.2
BUGFIXES:
* Fix bug #34801: The file content match test did reset of the
read position in the case that the unmonitor or stop action
was done. When the file monitoring was enabled again, the
content match test was applied to the content which was
tested already.
* Log error details in the case that the name resolving failed.
* Fix the system cpu usage statistics when pattern based process
check is used and the service is restarted. Thanks to Wayne
Lawrence for report.
* AIX 6.1 compile fix. Thanks to Benedikt Wegmann for patch.
* Debian Bug#652715: "include files not found" warning. Do not
display the warning if the include directory is empty.
Version 5.3.1
IMPROVEMENTS:
* Log the particular connection attempt failure in debug mode
when the retry is enabled.
* Monit can deliver events and status to independent M/Monit
instances if multiple mmonit URLs are set:
set mmonit https://user1:pass1@mmonit1/collector
https://user2:pass2@mmonit2/collector
BUGFIXES:
* The ICMP echo (ping) test may report false positive error
if the machine where Monit is running has heavy ICMP
traffic generated by other applications.
* The file content match test will be performed even on the
existing content when Monit starts. The last position is
saved to the statefile, so monit won't generate alert
after restart. Note that when you start the monit 5.3.1
the first time, it can do actions for content match which
was handled by previous monit version already as the
previous monit versions didn't saved the position.
* Make the monitoring state persistent for manual mode services.
* Display the memory usage total % in the status overview.
The memory usage in kB displayed the total already, so the
percentage didn't match.
* Fix the HTML overview page alignment in the Internet Explorer.
Thanks to Darhl Thomason for patch.
* Extend the SSL library search path for Debian Sid.
* Fix Solaris 10 compilation and Sun Studio support.
* Fix sporadic SSL routines:func(169):reason(161) errors
* If MySQL protocol test failed, report the correct MySQL
error code. Thanks to Vitaly Lipatov for patch.
Version 5.3
* New 'check program' statement added. Allows to check the exit
status of an external program or script from Monit.
* Added crontab style support for individual services. You can
now specify when an individual service should run its checks
(or not run). You can now, for instance, specify that apache
should be checked continuously, except between 1AM-5AM on
Sunday.
* Connection retry option added. Allows to retry a network
connection in the same testing cycle before reporting an error.
* Detailed protocol connection errors are now included in alerts.
* The HTML overview page displays the CPU and memory total now
(including children), so real service related usage is displayed
also for services which spawn worker processes, such as Apache
or Spamassassin.
* HTML view improvements
* Fix MySQL protocol test: MySQL 5.5.12 returns new error code in
the case of authentication failure.
* Fix Debian bug #621047: monit fails to build after SSLv2 removal
* Fix crash on Solaris which may occur if the system load is zero.
Thanks to Paul Sun for report.
* The stacktrace logging on error is disabled in -v (verbose) mode
as it was too verbose for common service debugging tasks, it can
be enabled using -vv option.
* Improve how fast Monit check if a program was started or stopped.
Thanks to Michael Renner for patch.
* Fix the monitoring state presentation during service restart which
temporarily displayed "Not monitored", whereas the monitoring was
enabled.
* The "data collected" is updated only if the check was not skipped.
Version 5.2.5
* Fix process match check - when the monitored process failed and
was restarted by Monit, Monit didn't recognized it is running
after the restart and reported start failure (similar on stop).
Thanks to Kenichi Futatsumori for report and helping to root
cause the problem.
* Fix Debian #617259: symbolic links in the filesystem check doesn't
work. Thanks to Sergey B Kirpichev for report.
* Fix Debian bug #614984: smtp protocol test issues both EHLO and
HELO. Thanks to Sergey B Kirpichev for report.
* Fix bug #32583: Multiple SIP OPTIONS messages use the same header
data. Thanks to Hugh Waite for patch.
* Try harder to get FQDN hostname for the host where monit is running.
The hostname in the $HOST variable which is used in the mail sender
may thus change. Thanks to Sergey B Kirpichev for patch.
* AIX: Fix the time display which was off by GMT difference. Thanks
to Helen Chen for report.
* AIX: Fix the M/Monit heartbeat. Thanks to Helen Chen for report.
* Support symbolic link to monit configuration file.
* Fix crash when monit daemon start delay option was used and monit
was signalized to stop before the start delay passed. Thanks to
John Schult for report.
Version 5.2.4
NEW FEATURES AND FUNCTIONS:
* Added the "procmatch" CLI command which allows for easy testing
of pattern for process match check. The command takes regular
expression as an argument and displays all running processes
matching the pattern. Example usage:
$ monit procmatch "iChatAgent"
* Set the default log file mask to 0640 (originally it was 0664).
Thanks to Sergey B Kirpichev.
* Reduced monit memory footprint by ca. 10%.
BUGFIXES:
* FreeBSD, NetBSD, OpenBSD, MacOSX, Solaris filesystem check fix:
If block/character device was used in the filesystem path instead
of mountpoint, monit reported usage of wrong filesystem.
* NetBSD filesystem check: Fix space usage report.
* Fix memory usage monitoring in OpenVZ VPS 2.6.32 virtual hosts.
Thanks to Kelly for report.
* If the protocol test failed, show the request in the event. Thanks
to Marco for report.
* Randomize the mail message id to prevent duplicates in the case, that
the same hostname is used on multiple hosts running monit and messages
are generated in the same second in parallel. Thanks to Sergey B
Kirpichev.
* Spelling fixes. Thanks to Sergey B Kirpichev.
Version 5.2.3
BUGFIXES:
* Mysql protocol test supports mysql 5.5.x and newer now.
Version 5.2.2
BUGFIXES:
* Fix crash on MacOSX
* ICMP echo test (ping):
- bug #31128: do not log error if different response type is received
- bug #31129: do not require root to use ping test. Privilege to create
raw socket is still required, but on some platforms such as Solaris it
can be granted to non-root users too. If the user has no permission to
perform ping, monit will skip the icmp test and log message (in debug
mode only).
* rsync protocol test:
- wait for full server response and verify exit was received
- bug #31249: send full version to rsync server. Thanks to John Hall
for report
Version 5.2.1
BUGFIXES:
* HTTP and URL protocol tests: Fixed a problem where HTTP protocol
tests using a specific request always failed. This bug may also
affect URL tests. The problem was caused by faulty URL encoding. In
the process of fixing this bug the new feature that allowed slash in
service names has been reverted and instead will be added in a later
release.
Version 5.2
NEW FEATURES AND FUNCTIONS:
* Added support for monitoring processes without pidfile using pattern
matching. You can use POSIX regular expressions or string matching
process name with arguments as provided by the 'ps' utility. If the
pattern matches multiple processes, the first match is used.
Example:
check process debian
matching "/usr/lib/vmware/bin/vmware-vmx .*deb.vmx"
* Added support for swap monitoring. Example:
check system myserver
if swap usage > 25% then alert
* Allow to override the default action when service doesn't exist. The
default action is restart, it can be customized with following
statement:
if [does] not exist [[<x> times within] <y> cycles] then <action1>
* Monit automatically registers credentials with M/Monit now, so it's
not necessary to set it manually in M/Monit anymore. To disable
credentials registration:
set mmonit https://monit:monit@10.0.0.1:8443/collector
and register without credentials
* Added memcache protocol test. Thanks to Sébastien Debrard for the
patch.
* Added openssl FIPS to Monit httpd. Thanks to Lior Okman for the
patch.
* The 'check system' can now use start/stop program statements too.
* Added the option to set the "Reply-To" mail header in mail-format.
* Display backtrace on error if debug mode is enabled (requires
backtrace support in libc)
BUGFIXES:
* Show real process uptime - formerly the presented uptime was based
on create and modify timestamp of process' pidfile which provides
invalid uptime if the pidfile is replaced and process keeps running
with original PID. Thanks to Nima Chavooshi for report.
* When user triggered action for some service (such as stop) and
before that action completed user triggered another action for the
same service (such as start), the second action has been ignored.
Monit will not accept new action and return temporary error until
the previous action completed.
* If process resource usage gathering failed, retry next cycle as the
error can be temporary.
* Fixed sporadic failures when SSL was used.
* ICMP echo test (ping):
- fixed sporadic false positive/negative
- removed limit of 20 pings per cycle
* DNS test:
- accept NS root request refusal as correct response because
server reacts on request
- accept authority answer as alternative to record. Thanks to
Nick Osborn for patch
* RADIUS test fix. Thanks to Alan DeKok for patch.
* M/Monit heartbeat is fully independent of testing cycle now to
prevent false positive when service test blocks.
* Fixed SMTP STARTTLS protocol, required for servers that adhere
strictly to RFC 3207 4.2. Thanks to Lorenzo A. Sedano Cadinanos for
patch.
* Service name:
- allow the service name to start with "/"
- fixed handling of the service names which contain "/" in the
name in Monit web interface. Thanks to Artyom Khafizov for
patch.
* When 'check system' is not defined, monit adds it automatically
using hostname for service name. If existing service was defined
with the same service name (matching hostname), monit didn't added
the entry and reported confusing error message pointing to the end
of configuration file. Thanks to Thorsten Kampe for report and help.
* Remove extra NL characters from message when resource succeeded
event is sent. The extra NL character may break the mail headers.
Thanks to Hanno Boeck for patch.
* Fixed display of cpu user/system/wait usage which temporarily
displayed -1.0% between two monitoring cycles while cpu monitoring
was initializing. Thanks to Marcus Muelbuesch for report.
* Fixed display of port response time as -1 if 'monit status' was
called in the middle of service test.
* Fixed display of service initializing state after monit start or
reload.
* Fixed MONIT_DESCRIPTION environment variable. Thanks to Marco
Roeland for patch
* AIX:
- fixed compilation
- fixed system load average monitoring
- fixed ICMP echo test
* Mac OS X:
- allow monitoring of system-wide load average, cpu and memory
usage even if
Monit is running as non-root user
* NetBSD:
- fixed ICMP echo test
Version 5.1.1
BUGFIXES:
* Fix FTP protocol test. Thanks to Axel Reinhold for report.
* Fix the HTTP protocol test's hostheader option which was added in 5.1.
Thanks to Naoya Nakazawa for report.
* Removed warning about missing system service check. Missing system service
check is not error and it shouldn't be reported as such.
* Fix manual page formating. Thanks to Stefan Alfredsson for report.
Version 5.1
NEW FEATURES AND FUNCTIONS:
* It is now possible to define any action for the restart timeout rule.
Multiple restart timeout rules can also be defined. Example:
if 3 restarts within 5 cycles then exec "/foo/bar"
if 8 restarts within 10 cycles then unmonitor
* Service can be added to multiple groups. Thanks to Brad Gessler
for suggestion. Syntax:
check filesystem wwwdata with path /www
group www
group filesystem
* Added GPS protocol test. Thanks to Sebastien Debrard for patch.
* Added RADIUS protocol test. Thanks to Alan DeKok for patch. Example syntax:
check process radiusd with pidfile /var/run/radiusd.pid
start program = "/etc/init.d/freeradius start"
stop program = "/etc/init.d/freeradius stop"
if failed
host 127.0.0.1 port 2000 type udp protocol radius secret testing1234
then alert
if 5 restarts within 5 cycles then timeout
* The HTTP protocol test now supports a hostheader option which allows to
override Host header in HTTP request. It can be used for example
to test a farm of HTTP servers by IP addresses and to set specific
Host header. Thanks to Brady Catherman for patch. Example:
if failed host 192.168.1.100 protocol http hostheader "example.com" then alert
* If an error occur during Monit command-line execution, report the error
and exit with 1, so it is possible to react if Monit is used from a script.
On success, 0 is returned as usual. Previously, Monit always exited with
0 even if an error occurred.
* Do not require SSL version type when specifying SSL communication with M/Monit
(SSL version is set to auto).
* If the Monit http interface failed to start, provide more details about
the reason.
BUGFIXES:
* Support resource monitoring (cpu usage, etc.) when Monit is running
inside virtual environment. Tested on:
- FreeBSD jail
- Solaris zone
- Linux Vserver
* Fix #26752: inside Solaris Zone, Monit failed to detect children
and computed host memory wrong
* On Solaris, FreeBSD, NetBSD and OpenBSD, Monit no longer needs to run as root user
in order to be able to watch process resource usage (cpu and memory).
* Send heartbeat to M/Monit even if Monit is busy in a long testing cycle to prevent
false alerts about non-responsive Monit agent.
* Fixed SMTP protocol test which may sometimes incorrectly
report ESMTP protocol failure. Thanks to Axel Reinhold for
report.
* Fixed content match check which reported only first
match during the same cycle. Thanks to Pavel Shevaev for
report.
* Allow for the use of complete SSL certificate chains.
Thanks to Lawrence Tan for patch.
* Added support for multiline greetings to FTP protocol test.
Thanks to Giovanni D'Cristina for report.
* Fix Debian Bug #541139: uses gethostbyname() and thus does
not work with "options inet6" in /etc/resolv.conf. Thanks to
Michael Stapelberg for patch.
* If Monit configuration allowed http interface access for a read-only
user and it was specified as the first allow entry, Monit command line
commands failed because it used the read-only account so commands
like start, stop, etc. were rejected. Monit will now use full access
regardless of allow option order. Thanks to Thorsten Kampe for report.
* Passive monitoring mode fixed. Thanks to Nelson Vale for report.
* Fixed #27784: wait_start/wait_stop can advance too quickly.
Thanks to Randy Puro for report.
* Solaris resource usage fixed when Monit was compiled with optimizations enabled.
* Fixed #28369: escape XML properly
* Check service name uniqueness when 'check system' is missing in monitrc and virtual
system service with name set to local hostname is added. Thanks to Marcus Muelbuesch
for report.
* Fix crash when queued event delivery was retried for service which was no longer
configured in Monit.
Version 5.0.3
BUGFIXES:
* Fixed #26664: crash on service timeout or unmonitor action
(introduced in 5.0.2). Thanks to Bretislav Kubesa and
Michael Shigorin for report.
* Removed the configure --without-resource option. If the user
who is running Monit doesn't have permissions to check the
processes state, the related checks are disabled dynamically.
Version 5.0.2
BUGFIXES:
* 35 improvements based on code scan with Klocwork
(http://www.klocwork.com/) which we were evaluating.
Huge thanks to Klocwork for their great product.
* Fixed #26382: if start or stop script for some service didn't
exist, monit logged error during configuration file parsing and
refused to start. Monit now just logs warning and continues.
Version 5.0.1
BUGFIXES:
* Fixed a bug where Monit did not stop logging succeeded events.
This bug occurred if PID, PPID, timestamp or size change tests
were used and failed and then succeeded again.
Version 5.0
NEW FEATURES AND FUNCTIONS:
* M/Monit support added. If you run Monit on more than one
server, you can use M/Monit to manage and control all your
Monit enabled servers from one simple Web Interface. See
http://mmonit.com/ for details.
* Support use of symbolic links in filesystem check. Thanks to
Aleksander Kamenik for suggestion. Example:
check filesystem rootfs path
/dev/disk/by-uuid/4ef973f7-67d1-4bb0-8223-cb1c692b72e4
if space usage > 95% then alert
if inode usage > 95% then alert
* If no 'set mailserver' was defined in monitrc, Monit tried to
fallback to localhost:25 SMTP server. This fallback was removed
since it may be confusing. If you want to deliver mail alerts
from Monit, the 'set mailserver' option is necessary. In case
it is missing, Monit will log appropriate error and hint to add
it.
* The generic send/expect protocol test limited the expect input
to 256 bytes. It's possible to set the input buffer for expect
globally - for example: set expectbuffer 20 kb Thanks to Asil
Carlin for suggestion.
* The following event types were added CONTENT, FSFLAGS, PID and
PPID and the following generic event types CHANGED and MATCH were
removed and replaced by the above types and with the existing SIZE,
CHECKSUM, TIMESTAMP events so the information is more specific
The event types are internal to Monit and unless you have used
either CHANGED or MATCH event in your alert filters, no change
is necessary (alerts are delivered as usual, the tests just use
different types internally).
* Monit now generates a unique id on first start and store the id
in a permanent file. This id is used in protocol communication
between Monit and M/Monit to pair a Monit instance with it's
host entry in M/Monit. By default the id file is placed in
$HOME/.monit.id. The location can be changed by using the set
idfile statement, for example:
set idfile /var/monit.id
* Monit now keep its service monitoring state even on Monit
restart. Previously Monit dropped the state when it was stopped
correctly. Services in manual monitoring mode will remember the
monitoring state across Monit restarts. If Monit is used in a
cluster, it is recommended to place the state file in a
temporary filesystem incase the primary machine will crash and
the the spare machine takeover, the state will be dropped on
reboot for the crashed machine and the services in manual
monitoring mode won't be started on reboot. For example the
"set statefile /tmp/monit.state" can be used to place the state
file in the /tmp/ filesystem.
* Added a protocol test for testing the LMTP protocol. Thanks
to Fco. Javier Felix for patch.
* Added the start delay option for daemon statement which allows
to pause Monit on its startup for a while. If monitored
services are started by init scripts in parallel on system
boot, Monit may be too fast and detect that the service is not
running (yet) and restart the service. Note that it's still
recommended Monit is setup to be responsible for service
startup (that is, don't use init to start Monit controlled
services, instead use Monit). This will ensure correct startup
without need for a start delay since Monit will have full
control of service startup. Many users start services from init
on boot anyway, so in such cases this option will solve their
problems. Default start delay is 0 which corresponds to the
current behavior. Example syntax which will make Monit wait one
minute before starting its first monitoring cycle:
--8<--
set daemon 5 with start delay 60
--8<--
Thanks to Fco. Javier Felix for patch.
* Added PAM support for Monit http interface authentication. Note
that PAM is not supported on all platforms - currently works on
Linux, Mac OS X, FreeBSD, NetBSD. Monit uses the PAM service "monit".
Here is a Monit PAM service example for Mac OS X which is able
to authenticate system users for Monit access -
/etc/pam.d/monit:
--8<--
# monit: auth account password session
auth sufficient pam_securityserver.so
auth sufficient pam_unix.so
auth required pam_deny.so
account required pam_permit.so
--8<--
And configuration for monitrc which allows only group admins
to access the http interface:
--8<--
set httpd port 2812 allow @admin
--8<--
See the PAM manual page for details on how to configure the PAM
service on your system and the available PAM plugins. Thanks to
Wilhelm Meier for patch.
* Added more detailed reports for Monit resource tests on service
recovery. Thanks to Lars Kotthoff for patch.
* Set locale to C.
* Added a protocol test for testing the SIP protocol which is
used by popular communication servers such as Asterisk and
FreeSWITCH. We received two patches for this protocol and have
taken code from both and merged them. Many thanks to Bret
McDanel and to Pierrick Grasland for supplying the patches.
* Added MONIT_DESCRIPTION to the list of environment variables
available to programs started by monit. Thanks to Morten
Bressendorff Schmidt for patch.
* If a service group is specified for Monit CLI action,
Monit no longer requires the "all" verb, so the following
command is possible:
monit -g web stop
If group is not specified (i.e. the -g option is omitted), the
service name or "all" is still required as a safeguard.
* Added an option to the 'set mailserver' statement so it is
possible to override the hostname used in SMTP EHLO/HELO and in
the Message-ID header when sending mail. Monit defaults to use
the localhost name. I.e. what you get when executing this
command 'uname -n'. Overriding the host name can be useful if
the host does not have a DNS entry and if the receiving
mailserver uses DNS verification as spam protection. The new
override option is:
set mailserver foo.bar.baz using hostname "my.monit.host"
* A new Event_Action type was added which reports actions
performed on Monit's administrator request (either via web
interface or CLI). If you don't want to received these events,
you can set the mail-filter for "action" event type.
* NOTA BENE: Monit start action is synchronous now. This improves
the startup sequence for dependent services, since Monit will
wait for parent service to start before trying to start the
child.
* It is now possible to define execution timeout for start and
stop commands. That is, how long Monit will wait after
executing a command before it assume execution failed. If the
timeout option is omitted, Monit defaults to 30 seconds. You
can override the timeout for example for services which are
starting slower.
Example syntax:
start program = "/bin/foo start" with timeout 60 seconds
* The event passed state is renamed to succeeded as this name
more reflects the state of things.
* The device service test is renamed to filesystem.
BUGFIXES:
* Some linux virtualization platforms report CPU count as 0.
Monit then dynamically disabled CPU usage monitoring. In such
case we now override the CPU count from 0 to 1 so resource
usage monitoring can continue. Thanks to Jenny Hopkins for
report.
* Increased the server socket backlog queue which will make Monit
able to handle more services. Thanks to Jochen Kramer.
* Fixed #24866: Email messages such as: cpu wait usage check
succeeded [current cpu wait usage=17.4%] were displayed as
"...usage<SOMEGARBAGE>.4%". The problem was incorrect transfer
encoding header in the email (the body itself was OK). Thanks
to Dave Cheney for report.
* When a Monit shutdown requested was issued while Monit were
working and testing services, Monit did not shutdown until all
work were done, i.e. until all services were tested. Monit will
now shutdown faster - as soon as it finish testing the current
service.
* Monit blocked/unblocked SIGTERM, SIGINT SIGHUP and SIGUSR1
signals during operation to protect certain code sections. When
a signal was sent during such a time, for example to stop
Monit, it was dropped and had to be retried in order to stop
Monit. This limitation is now removed and signals will be
processed at any time. Thanks to Nicola Tiling for report.
* If the Monit httpd allow option did not include a
user:password, Monit CLI logged the following error (even if
the action was performed anyway):
Cleartext credentials needed for basic authorization!
This error was false - even access restriction based on
host/net is sufficient - user and password is just one of
possible options (not requirement). Thanks to Gilad Benjamini
for report.
* Allow localhost as a value for the host header in the http
protocol test instead of setting an empty host header and let
the http server decide
* The 'if changed checksum ...' test can now be used even if a
monitored file doesn't exist at Monit startup. Thanks to Joe
Shang for report.
* If both event handlers (M/Monit and mail alerts) temporarily
failed at once and event queue was enabled, events will be
stored in the queue and delivered in the next cycle. However, a
bug caused delivery to be retried for every cycle for both
handlers if just one of them was recovered. Monit could then
deliver the same message multiple times until both handlers
recovered. The problem is now fixed and only one copy of the
event is sent even if only one handler did recover.
* Make unit in size test optional and default to byte unless
specified. So it is possible to write, if size > 1000 then ..
* Fixed handling of invalid input files in event queue handler.
Thanks to Fco.Javier Felix for patch.
* Set the content type to text/html for Monit web interface POST
responses. Thanks to Rich Drummond for patch.
* Fixed #23530: configure script will return error if bison,
byacc or yacc are not found at Monit compile time.
* Fix CPU and memory monitoring on Solaris (it was disabled on
Monit start)
* AIX fixes and extensions, Monit should run on AIX without
problems, including cpu, memory and filesystem monitoring
(tested with AIX 5.3). Thanks to Brian Downey for support
and help.
* HP-UX fixes and extensions, Monit should run on HP-UX without
problems, including cpu, memory and filesystem monitoring.
Thanks to Brian Downey for support and help.
* Fixed #23467: Don't exit, only issue a warning if the "include"
statement did not find any files to include.
* Fixed #23530: Event queue did not work with the default
unlimited slots.
* Fixed #23617: The process cpu usage is initializing in the
first cycle so the value is set to 0% - if the 'cpu usage <
xyz%' test was used to check that the process usage is higher
then given level, it was always true. Monit now skips the
process cpu usage check in the first cycle.
* Make sure Monit alerts has a unique message id. Thanks to Steve
Purcell for report
* Fixed possible crash when Monit is watching VPS environment on
Linux which reports number of CPUs as 0. Thanks to Marius
Schmidt for report.
* Cleanup event states during a service stop/unmonitor so old
events are not sent when the service is started/monitored again.
* Fixed #21989: Monit could start two instances of the process
when service restart is performed and the process is starting
slowly. Thanks to Nick Upson, Aaron Scamehorn and David Greaves
for report.
* Fixed #21550: Fix crash when Monit event queue contained an
empty file. Thanks to Douglas J Hunley for report.
* Fixed possible crash when the 'if changed checksum' test was
used along with restart action. Thanks to Brian Candler for
report.
* Fixed #22075: Allow using a mail address as username when using
SMTP authentication.
* Fixed #22191 and #19823: If the file content test does not match
anymore, reset the service error state. (Previous versions did
not clear the error state and kept showing a match in the status
listing and in the http interface).
* The 'if changed size ...' test can now be used even if the
monitored file does not exist on monit's start.
* If a htpasswd file is used to control Monit http interface
access and the hash type is set to MD5 but the file contains
wrong format (non-MD5), report the error and keep running.
Formerly Monit exited with an assert exception. Thanks to
Adrian Bridgett for report.
BACKWARD INCOMPATIBLE CHANGES:
* The current CPU usage test which checked the cpu usage of the
process itself plus the cpu usage of child processes was
renamed to TOTALCPU (otherwise it works the same). The new CPU
usage test checks the CPU usage of the process itself only.
This change was introduced to align the syntax with MEMORY and
TOTALMEMORY tests and to allow to test the CPU usage of
processes which fork child processes but the user don't want to
include children (such as Mythtv). Users who are using the CPU
check for services like Apache webserver to watch total cpu
utilization (including children) should rename the CPU
statement in their configuration to TOTALCPU.
Requires _KMEMUSER on NetBSD/current.
Reset maintainer to "pkgsrc-users@NetBSD.org".
PKGREVISION bumps for the security/openssl 1.0.1d update.
Drop superfluous PKG_DESTDIR_SUPPORT, "user-destdir" is default these days.
Fix Solaris 32-bit build.
Recursive PKGREVISION bump for jpeg update to 8.
Use standard location for LICENSE line (in MAINTAINER/HOMEPAGE/COMMENT block). Uncomment some commented out LICENSE lines while here.
Per the process outlined in revbump(1), perform a recursive revbump on packages that are affected by the switch from the openssl 0.9.7 branch to the 0.9.8 branch. ok jlam@
Monit switched to GPLv3.
Update to version 4.10.1.
Placate pkglint. Most of the package's patches had been integrated.
Approved by heinz@
Changes since last packaged version (4.9):
Version 4.10.1
BUGFIXES:
* When monit sent alert, it reported that alert handler failed,
which was not true and the message was delivered in fact. This
bug was introduced in monit-4.10.
* Fix the memory usage report on machines with more then 4GB
physical memory running Mac OS X.
Version 4.10
NEW FEATURES AND FUNCTIONS:
* Monit from this version on is licensed under GPL version 3
* Added support for SMTP authentication and SSL for sending alerts.
Example syntax:
- plain athentication:
set mailserver
smtp.foo.bar username "user" password "hidden"
- plain athentication with ssl:
set mailserver
smtp.foo.bar username "user" password "hidden" using sslv3
- plain athentication with tls:
set mailserver
smtp.foo.bar username "user" password "hidden" using tlsv1
Thanks to Thomas Lohmueller for patch.
* Allow to set the location of monirc using 'configure --sysconfdir'
option during monit compilation. Thanks to Klaus Heinz for patch.
* Monit now log user actions requested via monit's http interface.
* Monit http interface now use the POST method for forms
(change is transparent from the user point of view).
* Monit ICMP echo/ping test now supports 20 echo requests per cycle at
maximum.
* When monit identifies the process as zombie, continue the monitoring
(formerly monit disabled monitoring of the given service and sent alert
since it was considered unmanageable).
* Fixed #21447: Monit now adds a (dummy) Message-id header in alert
mails to prevent any spam checkers to accidental filter out monit
alerts based on missing message-id.
* Removed C99 particulars from monit code to support non-C99 compilers.
REMOVED FEATURE
* Removed support for local redirects in the HTTP protocol test. Users
must provide the correct path for the resource they want to test.
BUGFIXES:
* Fixed a possible monit crash on exit if a match rule was used and
referred a file containing multiple expressions. Thanks to Stephen
Dowdy for report.
* Added patch from Klaus Heinz which fix a problem in the Log module
that had monit using an uninitialized mutex after a monitrc reload.
* Fixed a possible crash on monit start when the monit control file
contained exec action with argument longer then 256 bytes. Thanks
to Stevan Bajic for report.
* Fixed linux 32-bit system CPU usage statistics (the fix in 4.9 was
incomplete). If a server had a long/large uptime and high load, the
reported CPU usage could be incorrect. Thanks to Aleksander for report.
* Fixed a problem where monit would incorrect display an error in the
web interface status page. This could occur if a service had failed,
monit had reload and the state of the service had passed just after the
reload (for example due to changes of the configuration rules). Thanks to
Claus Klein for report and help with the patch.
* Avoid filling the log with "pidfile does not contain a valid pidnumber"
entries during debug
* Added patch from Dave Cheney, which fix and reactivate resource testing
for Mac OS X Tiger (Darwin 10.4.x).
* Limit the number of consecutive redirects in http protocol test to 64.
* Report as error when the redirect in http protocol test points to itself.
* Fix memory leak when regular expresion is used in monit configuration
and monit is reloaded. Thanks to Josh Kelley for patch.
* Allow the "if changed timestamp" test to refer to a non-existing file.
This could be useful if the service is monitored in non-active mode
and the file is expected to be created later.
* When 'if match' statement was used with the path to the regex file
containing more then one line and the exec action was used for this
rule, then monit failed to parse the configuration and refused to start.
Thanks to Nathan for report.
* contrib/wap.php updated. Thanks to David Fletcher.
* Fixed #21354: Usage of the IMAP Protocol test was impossible due to a small
typo in the control file parser and the test would fall back to DEFAULT.
Thanks to Wolfgang Breyha for reporting the bug.
Initial import of monit 4.9. Monit is a utility for managing and monitoring, processes, files, directories and devices on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations.
Initial revision