linermin.blogg.se

Monit linux examples
Monit linux examples








monit linux examples

You also noticed that the monitoring program will take corrective action either in the form of restarting the service, or generating an alert. This says that we generate an alert if the load average is greater than 4 for 5 polling cycles.Īs you can see, the configuration file is easy to interpret, human readable. If loadavg (1min) > 4 for 5 cycles then alert This says to timeout the service if it had to be restarted 2 times within 3 polling intervals. One of the features I liked was the ability to use "conditional logic" in determining the alert action. If failed checksum then exec "/watch/dog" # Run /watch/dog in the case that the binary was changed

monit linux examples

Then exec "/usr/local/apache/bin/apachectl graceful" # Reload apache if the nf file was changed If failed port 80 protocol http then restart If cpu usage > 95% for 3 cycles then restart If 2 restarts within 3 cycles then timeout Start program = "/etc/init.d/httpd start" with timeout 60 seconds With pidfile "/usr/local/apache/logs/httpd.pid" Set alert httpd port 2812 and use address localhostĪllow localhost # Allow localhost to connect

monit linux examples

Set daemon 120 # Poll at 2-minute intervals What got me interested in monit, besides the fact that it's FOSS, was the easy configuration.

#Monit linux examples install

You may then install mmonit on a central monitoring management server, who will track all targets and report in the form of a nice "green-light/red-light" web interface. It's not an IPMI or SNMP aware monitoring package, but it's simplicity in setup, and built-in services monitoring is appealing for the situations I needed to track. I've been using a very simple monitoring package called Monit.










Monit linux examples