Difference between revisions of "Monit"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 20: Line 20:
 
<code>[[/etc/monit/monitrc]]</code>
 
<code>[[/etc/monit/monitrc]]</code>
 
  #  check system $HOST
 
  #  check system $HOST
  #    if loadavg (1min) per core > 2 for 5 cycles then alert
+
  #    if [[loadavg]] (1min) per core > 2 for 5 cycles then alert
 
  #    if loadavg (5min) per core > 1.5 for 10 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 cpu usage > 95% for 10 cycles then alert
 
  #    if memory usage > 75% then alert
 
  #    if memory usage > 75% then alert
  #    if swap usage > 25% then alert
+
  #    if [[swap]] usage > 25% then alert
 
 
  
 
== Related commands ==
 
== Related commands ==

Revision as of 07:46, 21 April 2021

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 email[1].



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

/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

See also

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