

If you are running a heartbeat/pacemaker cluster with built-in monitoring, you will not want your monitoring agents to restart the services. Whether or not you decide to implement corrective action on events will depend upon your systems architecture.
MONIT RESTART SERVICE LICENSE
License is a one-time payment (non-reccuring cost) and does not expire.
MONIT RESTART SERVICE PROFESSIONAL
The MMonit package is proprietary software, with support licenses of Basic (eu: 129 - 10 clients), Professional (eu: 229 - unlimited clients), Premium (eu: 998 - unlimited clients - source access). The MMonit package extends the basic (free) monit program by adding a central monitoring service, with historical tracking of events.

Monit provides a web interface that can be used to not just query monitor status but to also control the monitoring of configured services. 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 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 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 RESTART SERVICE 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. Is there a way to have this behavior in Monit or should I modify all my init.I've been using a very simple monitoring package called Monit. However, according to the documentation, Monit should first call the stop method (which in my case would delete de PID file) and then call the start method.

Monit calls the start method which fails since the init.d script looks for the PID file that wasn't deleted since the process crashed. It starts, monitors, restarts and stops release jobs. error : 'myProcess' failed to start (exit status 0) - '/etc/init.d/myProcess start': Starting myProcess. The Agent on each deployment job VM is responsible for managing lifecycle of each enabled release job. The process does not start since the PID file was not deleted by the stop method info : 'myProcess' start: '/etc/init.d/myProcess start' It crashed yesterday and the log said : error : 'myProcess' process is not running Stop program = "/etc/init.d/myProcess stop" Start program = "/etc/init.d/myProcess start" Here's the configuration : check process myProcess matching "myProcess" I'm monitoring some processes and I recently found out that the stop method is not called even though the restart method is not set. The stop method followed by the start method if restart is not set. Restart is performedīy calling the service's registered restart method or by first calling RESTART restarts the service and send an alert. Monit's documentation states the following for the restart action :
