423 |
"LOADAVG([1min|5min|15min])": |
"LOADAVG([1min|5min|15min])": |
424 |
|
|
425 |
CPUUSAGE is the CPU usage of the process and it's children in |
CPUUSAGE is the CPU usage of the process and it's children in |
426 |
parts of hundred (percent). For this resource the I<value> is a |
parts of hundred (percent). This resource I<value> is a floating |
427 |
floating point number. For instance, 60.0. |
point number. For instance, 60.0. |
428 |
|
|
429 |
In case the system has more then one CPU and the process has |
In case the system has more then one CPU and the process has |
430 |
child processes the CPU usage can raise above 100%. |
child processes the CPU usage can raise above 100%. |
431 |
|
|
432 |
MEMUSAGE is the memory usage of the process in parts of hundred |
MEMUSAGE is the memory usage of the process in parts of hundred |
433 |
(percent). For this resource the I<value> is also a floating |
(percent). This resource I<value> is also a floating point |
434 |
point number. |
number. |
435 |
|
|
436 |
MEMKBYTE is the memory amount of the process in KiB (1024 |
MEMKBYTE is the memory amount of the process in KiB (1024 |
437 |
byte). For this resource the I<value> is an integer number. |
byte). This resource I<value> is an integer number. |
438 |
|
|
439 |
LOADAVG([1min|5min|15min]) refers to the system's load average. |
LOADAVG([1min|5min|15min]) refers to the system's load average. |
440 |
The load average is the number of processes in the system run |
The load average is the number of processes in the system run |
441 |
queue averaged over the specified time period. For this resource |
queue averaged over the specified time period. This resource |
442 |
the I<value> is again a floating point number. |
I<value> is again a floating point number. |
443 |
|
|
444 |
I<operator> is a choice of "<",">","!=","==" in c notation, "gt", |
I<operator> is a choice of "<",">","!=","==" in c notation, "gt", |
445 |
"lt", "eq", "ne" in shell sh notation and "greater", "less", |
"lt", "eq", "ne" in shell sh notation and "greater", "less", |
458 |
has been reached. |
has been reached. |
459 |
|
|
460 |
STOP stops the service in case the maximum number of cycles has |
STOP stops the service in case the maximum number of cycles has |
461 |
been reached. |
been reached. If monit stops a service it will not be checked by |
462 |
|
monit anymore nor restarted again later. You must explicit start |
463 |
|
it again from the web interface or from the console, like: 'monit |
464 |
|
start apache' if you want monit to monitor the service again. |
465 |
|
|
466 |
To calculate the cycles a counter is raised whenever the |
To calculate the cycles a counter is raised whenever the |
467 |
expression above is true and it is lowered whenever it is false |
expression above is true and it is lowered whenever it is false |
472 |
beyond 50% for five cycles before restarting it, the following |
beyond 50% for five cycles before restarting it, the following |
473 |
expression could be used: |
expression could be used: |
474 |
|
|
475 |
if cpuusage greater than 50.0 for 5 cylces then restart |
if cpuusage is greater than 50.0 for 5 cylces then restart |
476 |
|
|
477 |
Or the short version without noise words is like: |
Or the short version without noise keywords: |
478 |
|
|
479 |
cpuusage > 50.0 5 restart |
cpuusage > 50.0 5 restart |
480 |
|
|
483 |
|
|
484 |
=head1 CONNECTION TESTING |
=head1 CONNECTION TESTING |
485 |
|
|
486 |
Monit is able to to perfom connection testing via networked ports |
Monit is able to perfom connection testing via networked ports |
487 |
and via unix sockets. |
and via unix sockets. |
488 |
|
|
489 |
If a program listens on one or more sockets, monit can connect to |
If a program listens on one or more sockets, monit can connect to |
938 |
And here is a complete list of B<noise keywords> ignored by |
And here is a complete list of B<noise keywords> ignored by |
939 |
monit: |
monit: |
940 |
|
|
941 |
I<if>, I<on(ly)>, I<with(in)>, I<and>, I<has>, I<using>, I<use>, |
I<if>, I<is>, I<are>, I<on(ly)>, I<with(in)>, I<and>, I<has>, |
942 |
I<the>, I<sum>, I<restarts>, I<program(s)>, I<cycle(s)>, |
I<using>, I<use>, I<the>, I<sum>, I<restarts>, I<program(s)>, |
943 |
I<than>, I<for>. |
I<cycle(s)>, I<than>, I<then>, I<for>. |
944 |
|
|
945 |
B<Note:> If the I<start> or I<stop> programs are shell scripts, |
B<Note:> If the I<start> or I<stop> programs are shell scripts, |
946 |
then the script must begin with C<#!> and the remainder of the |
then the script must begin with C<#!> and the remainder of the |
1101 |
and use the request "/login.html" |
and use the request "/login.html" |
1102 |
host shop.sol.no port 443 type tcp # default protocol test |
host shop.sol.no port 443 type tcp # default protocol test |
1103 |
timeout (2,3) |
timeout (2,3) |
1104 |
|
if cpuusage is greater than 60.0 for 2 cycles then alert |
1105 |
|
if cpuusage > 80.0 for 5 cycles then restart |
1106 |
|
if memkbyte > 100000 then stop |
1107 |
alert foo@bar on { checksum } |
alert foo@bar on { checksum } |
1108 |
alert bofh@bar on { restart, timeout } with |
alert bofh@bar on { restart, timeout } with |
1109 |
mail-format { from: monit@foo.bar.no } |
mail-format { from: monit@foo.bar.no } |