![]() If failed host 0.0.0.0 port 80 then restart # NTP #Ĭheck process ntpd with pidfile /var/run/ntpd. Start program = “/etc/init.d/httpd start” If failed port 22 protocol ssh then restart # Webserver #Ĭheck process webserver with pidfile /var/run/httpd/httpd.pid Following are some useful configuration examples for monit, that can be very helpful to see how a service is running, where it keeps its pidfile and how to start and stop a service etc: # SSH # To do this, we will create separate files for every service located within the /etc/monit.d/ directory. Once the initial config is completed, we can configure some of the services we want to monitor. Once you’ve configured it, you need to start the monit service to reload the new configuration settings: sudo /etc/init.d/monit start Use address localhost # only accept connection from localhostĪllow localhost # allow localhost to connect to the server andĪllow admin:monit # require user 'admin' with password 'monit'Īllow # allow users of group 'monit' to connect (rw)Īllow readonly # allow users of group 'users' to connect readonly sudo apt-get updateĪfter the installation is complete, edit the main config file to resemble the example below using your favorite text editor and set your own username and password: nano /etc/monit/monitrc set httpd port 2812 and # set the listening port to your desire. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root. Use Grafana for plotting time series metrics from different datasources like Elasticsearch or InfluxDB. A non-root sudo useror access to the root user. Examples of use of the MONIT infrastructure in CERN IT and WLCG Infrastructure.SSH access to the server (or just open Terminal if you’re on a desktop).It’s recommended that you use a fresh OS install to prevent any potential issues. ![]() A server running one of the following operating systems: Ubuntu 14.04, and any other Debian-based distribution.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |