Difference between revisions of "Monit"

From wikieduonline
Jump to navigation Jump to search
(Created page with "Monit is a free, open-source process supervision tool for Unix and Linux. Monit can restart a process automatically if process dies or monitor process char...")
 
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[wikipedia:Monit|Monit]] is a free, open-source process supervision tool for Unix and Linux. Monit can restart a process automatically if process dies or monitor process characteristics, such as memory or cpu cycles and alert or execute and action. Monit only support alert messages by emailt<ref>https://mmonit.com/monit/documentation/monit.html#ALERT-MESSAGES</ref>.
+
[[wikipedia:Monit|Monit]] ([https://linux.die.net/man/1/monit man]) is a free, open-source process supervision tool for Unix and Linux. Monit can restart a process automatically if process dies or monitor [[process]] characteristics, such as memory or cpu cycles and alert or execute and action. Monit only support [[alert messages]] by email<ref>https://mmonit.com/monit/documentation/monit.html#ALERT-MESSAGES</ref>.
 +
Monit support monitoring [[cpu]], [[memory]], [[swap]] usage and [[loadavg]] among others.
  
 +
== Installation ==
 +
* Installation [[macOS]]: <code>[[brew install monit]]</code>
 +
* Linux: <code>[[apt install monit]]</code>
 +
* Access: http://localhost:2812/  (admin/monit)
  
* Config file: <code>/etc/monit/monitrc</code> (<code>monit -t</code>) to verify configuration file
+
 
::<code>set daemon 120</code> By default configured to check services every 120 seconds.
+
 
* Logs: <code>/var/log/monit.log</code>
+
* Config file: <code>[[/etc/monit/monitrc]]</code> (<code>[[monit -t]]</code>) to verify configuration file
* Command: <code>monit status</code>
+
::<code>set daemon 120</code> By default configured to check services every 120 seconds
* Restart Monit service: <code>systemctl restart monit.service</code>
+
:: Review examples: https://mmonit.com/wiki/Monit/ConfigurationExamples
 +
* Logs: <code>/var/log/[[monit.log]]</code>
 +
* Command: <code>[[monit status]]</code>
 +
* Restart Monit service: <code>systemctl restart monit.service && systemctl status monit</code>
 +
 
 +
== Example ==
 +
<code>[[/etc/monit/monitrc]]</code>
 +
#  check system $HOST
 +
#    if [[loadavg]] (1min) per core > 2 for 5 cycles then alert
 +
#    if loadavg (5min) per core > 1.5 for 10 cycles then alert
 +
#    if cpu usage > 95% for 10 cycles then alert
 +
#    if memory usage > 75% then alert
 +
#    if [[swap]] usage > 25% then alert
 +
 
 +
== Related commands ==
 +
* <code>[[logcheck]]</code>
 +
* <code>[[glances]]</code>
  
 
== See also ==
 
== See also ==
* [[Nagios]]
+
* {{monit}}
* [[Zabbix]]
+
* {{Monitoring software}}
 +
* {{monitoring}}
 +
 
  
 
[[Category:Linux]]
 
[[Category:Linux]]
 
[[Category:Server administration]]
 
[[Category:Server administration]]
 
[[Category:Monitoring]]
 
[[Category:Monitoring]]

Latest revision as of 05:38, 14 June 2024

Monit (man) is a free, open-source process supervision tool for Unix and Linux. Monit can restart a process automatically if process dies or monitor process characteristics, such as memory or cpu cycles and alert or execute and action. Monit only support alert messages by email[1]. Monit support monitoring cpu, memory, swap usage and loadavg among others.

Installation[edit]


set daemon 120 By default configured to check services every 120 seconds
Review examples: https://mmonit.com/wiki/Monit/ConfigurationExamples
  • Logs: /var/log/monit.log
  • Command: monit status
  • Restart Monit service: systemctl restart monit.service && systemctl status monit

Example[edit]

/etc/monit/monitrc

#  check system $HOST
#    if loadavg (1min) per core > 2 for 5 cycles then alert
#    if loadavg (5min) per core > 1.5 for 10 cycles then alert
#    if cpu usage > 95% for 10 cycles then alert
#    if memory usage > 75% then alert
#    if swap usage > 25% then alert

Related commands[edit]

See also[edit]

  • https://mmonit.com/monit/documentation/monit.html#ALERT-MESSAGES
  • Advertising: