"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/monit.pod" between
monit-5.27.2.tar.gz and monit-5.28.0.tar.gz

About: Monit is a utility for managing and monitoring processes, files, directories and filesystems (with automatic error recovery).

monit.pod  (monit-5.27.2):monit.pod  (monit-5.28.0)
skipping to change at line 186 skipping to change at line 186
=over 4 =over 4
=item start all =item start all
Start all services listed in the control file and enable Start all services listed in the control file and enable
monitoring for them. If the group option is set (I<-g>), only monitoring for them. If the group option is set (I<-g>), only
start and enable monitoring of services in the named group ("all" start and enable monitoring of services in the named group ("all"
is not required in this case). is not required in this case).
=item start <name> =item start <name|pattern>
Start the named service and enable monitoring for it. The name is Start the named service and enable monitoring for it. The name is
a service entry name from the monitrc file. a service entry name from the monitrc file.
=item stop all =item stop all
Stop all services listed in the control file and disable their Stop all services listed in the control file and disable their
monitoring. If the group option is set, only stop and disable monitoring. If the group option is set, only stop and disable
monitoring of the services in the named group ("all" is not monitoring of the services in the named group ("all" is not
required in this case). required in this case).
=item stop <name> =item stop <name|pattern>
Stop the named service and disable its monitoring. The name is a Stop the named service and disable its monitoring. The name is a
service entry name from the monitrc file. service entry name from the monitrc file.
=item restart all =item restart all
Stop and start I<all> services. If the group option is set, only Stop and start I<all> services. If the group option is set, only
restart the services in the named group ("all" is not required in restart the services in the named group ("all" is not required in
this case). this case).
=item restart <name> =item restart <name|pattern>
Restart the named service. The name is a service entry name from Restart the named service. The name is a service entry name from
the monitrc file. the monitrc file.
=item monitor all =item monitor all
Enable monitoring of all services listed in the control file. If Enable monitoring of all services listed in the control file. If
the group option is set, only start monitoring of services in the the group option is set, only start monitoring of services in the
named group ("all" is not required in this case). named group ("all" is not required in this case).
=item monitor <name> =item monitor <name|pattern>
Enable monitoring of the named service. The name is a service Enable monitoring of the named service. The name is a service
entry name from the monitrc file. Monit will also enable entry name from the monitrc file. Monit will also enable
monitoring of all services this service depends on. monitoring of all services this service depends on.
=item unmonitor all =item unmonitor all
Disable monitoring of all services listed in the control file. If Disable monitoring of all services listed in the control file. If
the group option is set, only disable monitoring of services in the group option is set, only disable monitoring of services in
the named group ("all" is not required in this case). the named group ("all" is not required in this case).
=item unmonitor <name> =item unmonitor <name|pattern>
Disable monitoring of the named service. The name is a service Disable monitoring of the named service. The name is a service
entry name from the monitrc file. Monit will also disable entry name from the monitrc file. Monit will also disable
monitoring of all services that depends on this service. monitoring of all services that depends on this service.
=item status [name] =item status [name|pattern]
Print service status information. Print service status information.
=item summary [name] =item summary [name|pattern]
Print a short status summary. Print a short status summary.
=item report [up | down | initialising | unmonitored | total] =item report [up | down | initialising | unmonitored | total]
Report services state. The output can easily be parsed by scripts. Report services state. The output can easily be parsed by scripts.
Without options, prints a short overview of the state of all Without options, prints a short overview of the state of all
services managed by Monit. The option, I<up> prints the number of services managed by Monit. The option, I<up> prints the number of
all services in this state, I<down> likewise and so on. all services in this state, I<down> likewise and so on.
skipping to change at line 1051 skipping to change at line 1051
o Timestamp test failed (e.g. file is older then expected) o Timestamp test failed (e.g. file is older then expected)
o Permission test failed (e.g. file mode doesn't match) o Permission test failed (e.g. file mode doesn't match)
o An UID test failed (e.g. file owned by different user) o An UID test failed (e.g. file owned by different user)
o A GID test failed (e.g. file owned by different group) o A GID test failed (e.g. file owned by different group)
o A process's PID changed out of Monit's control o A process's PID changed out of Monit's control
o A process's PPID changed out of Monit control o A process's PPID changed out of Monit control
o Too many service recovery attempts failed o Too many service recovery attempts failed
o A file content test found a match o A file content test found a match
o Filesystem flags changed o Filesystem flags changed
o A service action was performed by administrator o A service action was performed by administrator
o A network link failed o A network link down or up
o A network link capacity changed o A network link capacity changed
o A network link saturation failed o A network link saturation failed
o A network link upload/download rate failed o A network link upload/download rate failed
o Monit was started, stopped or reloaded o Monit was started, stopped or reloaded
To get an alert via e-mail, set the alert target using the global C<set To get an alert via e-mail, set the alert target using the global C<set
alert> statement (for all services) or the C<alert> statement in the alert> statement (for all services) or the C<alert> statement in the
context of a service entry (for a single service). context of a service entry (for a single service).
=head2 Setting an alert recipient =head2 Setting an alert recipient
skipping to change at line 1756 skipping to change at line 1756
=head2 GENERAL SYNTAX =head2 GENERAL SYNTAX
Monit offers several if-tests you can use in a 'check' statement to test Monit offers several if-tests you can use in a 'check' statement to test
various aspects of a service. various aspects of a service.
You can test both for a predefined value or for a range and take actions if the You can test both for a predefined value or for a range and take actions if the
value changes. value changes.
General syntax for testing a specific value or range: General syntax for testing a specific value or range:
IF <test> THEN <action> [ELSE IF SUCCEEDED THEN <action>] IF <test> THEN <action> [ELSE <action>]
The action is evaluated each time the <TEST> condition is true. Success The action is evaluated each time the <TEST> condition is true. Success
action is optional and executed only when the state changes from action is optional and executed only when the state changes from
failure to success. If success action is not set, Monit will send a failure to success. If success action is not set, Monit will send a
recovery alert by default. recovery alert by default.
General syntax for a value change test: General syntax for a value change test:
IF CHANGED <test> THEN <action> IF CHANGED <test> THEN <action>
skipping to change at line 2976 skipping to change at line 2976
=back =back
=head3 Link status =head3 Link status
You can check the network link state. This test may only be used You can check the network link state. This test may only be used
within a check network service entry in the Monit control file. within a check network service entry in the Monit control file.
Syntax: Syntax:
IF FAILED LINK THEN action IF LINK <DOWN|UP> THEN action
I<action> is a choice of "ALERT", "RESTART", "START", "STOP", I<action> is a choice of "ALERT", "RESTART", "START", "STOP",
"EXEC" or "UNMONITOR". "EXEC" or "UNMONITOR".
The test will fail if the link/interface is down or link errors were detected. The I<DOWN> test will fail if the link/interface is down or link errors were
detected.
Example: Mixing "link up" and "link down" in the same "check network" is not supported.
Examples:
check network eth0 with interface eth0 check network eth0 with interface eth0
if failed link then alert if link down then alert
check network eth5 with interface eth5
if link up then exec "/usr/bin/monit start backup"
In case a link failed you can add a start and stop program to automatically In case a link failed you can add a start and stop program to automatically
restart the interface which might help. (Substitute with the relevant network restart the interface which might help. (Substitute with the relevant network
commands for your system) commands for your system)
check network eth0 with interface eth0 check network eth0 with interface eth0
start program = '/sbin/ipup eth0' start program = '/sbin/ipup eth0'
stop program = '/sbin/ipdown eth0' stop program = '/sbin/ipdown eth0'
if failed link then restart if link down then restart
=head3 Link capacity =head3 Link capacity
You can check the network link mode capacity for changes. This test You can check the network link mode capacity for changes. This test
may only be used within a check network service entry in the Monit may only be used within a check network service entry in the Monit
control file. control file.
Syntax: Syntax:
IF CHANGED LINK [CAPACITY] THEN action IF CHANGED LINK [CAPACITY] THEN action
skipping to change at line 3146 skipping to change at line 3152
Monit can perform a network ping test by sending ICMP echo request Monit can perform a network ping test by sending ICMP echo request
datagram packets to a host and wait for the reply. This test can datagram packets to a host and wait for the reply. This test can
only be used within a check host statement. Monit must also run as only be used within a check host statement. Monit must also run as
the root user in order to be able to perform the ping test (because the root user in order to be able to perform the ping test (because
the ping test must use raw sockets which usually only the super user the ping test must use raw sockets which usually only the super user
is allowed to). is allowed to).
Syntax: Syntax:
IF FAILED PING[4|6] IF <FAILED|SUCCEEDED> PING[4|6]
[COUNT number] [COUNT number]
[SIZE number] [SIZE number]
[RESPONSETIME number <MILLISECONDS|SECONDS>]
[TIMEOUT number SECONDS] [TIMEOUT number SECONDS]
[ADDRESS string] [ADDRESS string]
THEN action THEN action
If a DNS host name was used in the I<check host> statement and the host If a DNS host name was used in the I<check host> statement and the host
name resolve to several addresses (either IPv4 or IPv6), Monit will name resolve to several addresses (either IPv4 or IPv6), Monit will
ping the first available address and continue with the next address ping the first available address and continue with the next address
until one connection succeed or until there are no more addresses left until one connection succeed or until there are no more addresses left
to try. You can force Monit to only ping IPv4 or IPv6 addresses by to try. You can force Monit to only ping IPv4 or IPv6 addresses by
using the PING4 or the PING6 keyword instead of PING. using the PING4 or the PING6 keyword instead of PING.
The B<COUNT> parameter specifies how many consecutive ping requests The B<COUNT> parameter specifies how many consecutive ping requests
will be sent to the host in one cycle at maximum. The default value is 3. will be sent to the host in one cycle at maximum. The default value is 3.
The B<SIZE> parameter specifies the ping request payload size. Default The B<SIZE> parameter specifies the ping request payload size. Default
is 64 bytes, minimum is 8 bytes, maximum 1492 bytes. is 64 bytes, minimum is 8 bytes, maximum 1492 bytes.
The B<RESPONSETIME> parameter sets the response time limit.
If no reply arrive within B<TIMEOUT> seconds, Monit reports an error. If no reply arrive within B<TIMEOUT> seconds, Monit reports an error.
If at least one reply was received, the ping test is considered a If at least one reply was received, the ping test is considered a
success. success.
The B<ADDRESS> parameter specifies source IP address. The B<ADDRESS> parameter specifies source IP address.
Monit will, by default, send up to I<three> ping request packets in Monit will, by default, send up to I<three> ping request packets in
one cycle to prevent false alarm (i.e. up to 66% packet loss is one cycle to prevent false alarm (i.e. up to 66% packet loss is
tolerated). You can set the B<COUNT> option to a value between 1 and tolerated). You can set the B<COUNT> option to a value between 1 and
20 to send more or fewer packets. If you require 100% ping success, 20 to send more or fewer packets. If you require 100% ping success,
skipping to change at line 3207 skipping to change at line 3216
check host mmonit.com with address mmonit.com check host mmonit.com with address mmonit.com
if failed ping4 then alert # IPv4 only if failed ping4 then alert # IPv4 only
if failed ping6 then alert # IPv6 only if failed ping6 then alert # IPv6 only
or with all parameters; Send five 128 byte pings to mmonit.com and wait or with all parameters; Send five 128 byte pings to mmonit.com and wait
for up to 10 seconds for a reply for up to 10 seconds for a reply
check host mmonit.com with address mmonit.com check host mmonit.com with address mmonit.com
if failed ping count 5 size 128 with timeout 10 seconds then alert if failed ping count 5 size 128 with timeout 10 seconds then alert
You can also watch host, that is supposed to be offline:
check host offlinehost with address 192.168.100.50
if succeeded ping then alert
=head2 CONNECTION TESTS =head2 CONNECTION TESTS
Monit can perform connection testing via network ports or via Monit can perform connection testing via network ports or via
Unix sockets. A connection test may only be used within a Unix sockets. A connection test may only be used within a
process or host service type context. process or host service type context.
If a service listens on one or more sockets, Monit can connect to If a service listens on one or more sockets, Monit can connect to
the port (using TCP or UDP) and verify that the service will accept the port (using TCP or UDP) and verify that the service will accept
a connection and that it is possible to write and read from the socket. a connection and that it is possible to write and read from the socket.
If a connection is not accepted or if there is a problem with socket If a connection is not accepted or if there is a problem with socket
I/O, Monit will execute a specified action. I/O, Monit will execute a specified action.
For TCP/UDP ports monit can alert on successful connection, e.g. when a
service like mysql should not be publicly available.
TCP/UDP port test syntax: TCP/UDP port test syntax:
IF FAILED IF <FAILED|SUCCEEDED>
[HOST string] [HOST string]
<PORT number> <PORT number>
[ADDRESS string] [ADDRESS string]
[IPV4 | IPV6] [IPV4 | IPV6]
[TYPE <TCP|UDP>] [TYPE <TCP|UDP>]
[<SSL|TLS> [with options {...}] [<SSL|TLS> [with options {...}]
[CERTIFICATE CHECKSUM [MD5|SHA1] string] [CERTIFICATE CHECKSUM [MD5|SHA1] string]
[CERTIFICATE VALID for number DAYS] [CERTIFICATE VALID for number DAYS]
[PROTOCOL protocol | <SEND|EXPECT> "string",...] [PROTOCOL protocol | <SEND|EXPECT> "string",...]
[RESPONSETIME number <MILLISECONDS|SECONDS>]
[TIMEOUT number SECONDS] [TIMEOUT number SECONDS]
[RETRY number] [RETRY number]
THEN action THEN action
Unix socket test syntax: Unix socket test syntax:
IF FAILED IF <FAILED|SUCCEEDED>
<UNIXSOCKET path> <UNIXSOCKET path>
[TYPE <TCP|UDP>] [TYPE <TCP|UDP>]
[PROTOCOL protocol | <SEND|EXPECT> "string",...] [PROTOCOL protocol | <SEND|EXPECT> "string",...]
[RESPONSETIME number <MILLISECONDS|SECONDS>]
[TIMEOUT number SECONDS] [TIMEOUT number SECONDS]
[RETRY number] [RETRY number]
THEN action THEN action
Examples: Examples:
if failed port 80 then alert if failed port 80 then alert
if failed port 53 type udp protocol dns then alert if failed port 53 type udp protocol dns then alert
if succeeded host example.org port 3306 type tcp protocol mysql then alert
if failed unixsocket /var/run/sophie then alert if failed unixsocket /var/run/sophie then alert
Options: Options:
I<HOST hostname>. Optionally specify the host to connect to. I<HOST hostname>. Optionally specify the host to connect to.
If the host is not given then localhost is assumed if this test If the host is not given then localhost is assumed if this test
is used inside a process entry. If this test is used inside a is used inside a process entry. If this test is used inside a
remote host entry then the entry's remote host is assumed. remote host entry then the entry's remote host is assumed.
I<PORT number>. The port number to connect to I<PORT number>. The port number to connect to
skipping to change at line 3360 skipping to change at line 3381
I<SMTPS> I<SMTPS>
I<SPAMASSASSIN> I<SPAMASSASSIN>
I<SSH> I<SSH>
I<TNS> I<TNS>
I<WEBSOCKET> I<WEBSOCKET>
If the target server's protocol is not found in this list, simply If the target server's protocol is not found in this list, simply
do not specify the protocol and Monit will use a default connection do not specify the protocol and Monit will use a default connection
test. test.
I<RESPONSETIME> parameter sets the response time limit.
I<TIMEOUT number SECONDS>. Optionally specifies the I<TIMEOUT number SECONDS>. Optionally specifies the
connect and read timeout for the connection. If Monit cannot connect and read timeout for the connection. If Monit cannot
connect to the server within this time it will assume that the connect to the server within this time it will assume that the
connection failed and execute the specified action. The default connection failed and execute the specified action. The default
connect timeout is 5 seconds. connect timeout is 5 seconds.
I<RETRY number>. Optionally specifies the number of consecutive I<RETRY number>. Optionally specifies the number of consecutive
retries within the same testing cycle in the case that the retries within the same testing cycle in the case that the
connection failed. The default is fail on first error. connection failed. The default is fail on first error.
skipping to change at line 4246 skipping to change at line 4269
will then print debug information to the console, to stop monit will then print debug information to the console, to stop monit
in this mode, simply press CTRL^C (i.e. SIGINT) in the same in this mode, simply press CTRL^C (i.e. SIGINT) in the same
console. console.
The syntax (and parser) of the control file was inspired by Eric The syntax (and parser) of the control file was inspired by Eric
S. Raymond et al.'s excellent fetchmail program. Some portions S. Raymond et al.'s excellent fetchmail program. Some portions
of this man page also receive inspiration from the same authors. of this man page also receive inspiration from the same authors.
=head1 COPYRIGHT =head1 COPYRIGHT
Copyright (C) 2001-2020 by Tildeslash Ltd. All Rights Reserved. Copyright (C) 2001-2021 by Tildeslash Ltd. All Rights Reserved.
This product is distributed in the hope that it will be useful, This product is distributed in the hope that it will be useful,
but WITHOUT any warranty; without even the implied warranty of but WITHOUT any warranty; without even the implied warranty of
MERCHANTABILITY or FITNESS for a particular purpose. MERCHANTABILITY or FITNESS for a particular purpose.
=head1 SEE ALSO =head1 SEE ALSO
GNU text utilities; md5sum(1); sha1sum(1); openssl(1); glob(7); GNU text utilities; md5sum(1); sha1sum(1); openssl(1); glob(7);
regex(7); I<https://mmonit.com> regex(7); I<https://mmonit.com>
=cut =cut
 End of changes. 26 change blocks. 
18 lines changed or deleted 41 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)