However we want only the alert specific emails. Use the mail command to verify that the system is correctly configured to send out emails.Īvoid non-alert emails - Monit by default sends out emails for every thing it does or everything that happens. Make sure that there is an smtp server (MTA) running on localhost and that it is able to deliver mails properly. Find the line "set alert" and specify the email where you want the reports to be delivered. The whole idea behind monit is to get alerted whenever something unexpected occurs. Now access and the Monit web interface should open up. # allow readonly # allow users of group 'users' to connect readonly # allow # allow users of group 'monit' to connect (rw) # allow localhost # allow localhost to connect to the server andĪllow admin:monit # require user 'admin' with password 'monit' # use address localhost # only accept connection from localhost ![]() If the line doesn't exist, then just create one. ![]() Later on, its better to disable it to keep things secure.įind the "set httpd" line in the configuration file and uncomment it. This is useful when setting up and testing monit. The web interface allows you to check Monit reports from browser. Reload the new configuration without restarting all of monit # sudo monit reload Enable the web interface Monit also has a log file located at /var/log/monit.log that would contain valuable information if you need to fix somethingĪfter configuration test the new configuration by running the following command # sudo monit -t Start editing the configuration file to add the services you want to monitor. You can either add all configurations to this file - /etc/monit/monitrc, or create additional configuration files in the /etc/monit/conf.d/ directory and monit would automatically read and load all of them The configuration file for Monit is located at /etc/monit/monitrc on Ubuntu and Debian based systems. The next thing to do is configure monit to monitor specific things. Install using apt-get $ sudo apt-get install monitĪfter installation monit would start as a background service and can be verified with the following command # service monit status On Debian and Ubuntu based systems Monit is available in the default repositories. The tool itself is quite light weight and allows users to write "tests" using a very simple script style language. ![]() In this post we are going to play with a tool called Monit that can monitor services and processes on a server and send out alert emails when anything fails. It allows system administrators to get notified and fix problems as soon as possible with minimal interruption or down time. Automated monitoring is necessary to ensure and maximize the uptime and availability of system services on a server.
0 Comments
Leave a Reply. |