Monit - Open source monitoring for Unix systems
Monit is the great tool for this purpose as it checks your services periodically and restarts them in case of any troubles. It is a small open source utility for managing and monitoring Unix systems.
This tutorial will cover the most basic setup and configurations to increase the uptime of your applications in case of catastrophic failures.
$ sudo apt-get install monit
Enable Web Interface
Monit comes with it’s own web server to view services and processes status. By default, it is not enabled. To enable it, open the monitrc file which is used to configure “how to control Monit”.
$ sudo nano /etc/monit/monitrc
Keep all the settings as it is and add following code at the bottom of this file just after include /etc/monit/conf.d/* line.
set httpd port 2812 and use address localhost allow 0.0.0.0/0.0.0.0 # allow localhost to connect to the server allow admin:monit # require user 'admin' with password 'monit'
As per above configuration, monit will start on port 2812 (generally) and accessible from localhost. But you are free to use any available port for this purpose.
Start the Monit
$ sudo service monit start or $ sudo monit start all
Note:If you face the error like “monit: Cannot connect to the monit daemon. Did you start it with http support?”
Just restart the monit daemon by running service monit restart command.
Other Useful Commands
$ sudo service monit stop $ sudo service monit reload
Check the status of running services
$ sudo monit summary
Detailed description of each service
$ sudo monit status
Using this command, we can see the detailed description of all running services.
Thanks for the Reading!!
Monit is a helpful program that automatically monitors and manages server programs to ensure that they not only stay…www.digitalocean.com
Monit Configuration for Rails, Sidekiq, Mysqld and Redis 1. About Monit Monit is a small Open Source utility for… richfisher.me
At BoTree Technologies, we build web and mobile applications to add value to our client’s business. We align ourselves to ensure that our client benefits the most out of our engagement.
Drop us a line to discuss how can we help take your business to the next level.
We assure, you would hear back from us in less than 8 hours.
Choose Your Language
- Digital Marketing
- IT Consulting
- Project Management