I’m going to create a custom configuration file for the two on /etc/monit/conf.d/nf. On my local machine, I have apache2 and MariaDB running programs. I’ll do a demo of how to monitor a process with monit. To check configuration files syntax, use: $ sudo monit -tĬheck monitored processes summary: # monit summary Typing monit status command will display details about monit status. $ sudo monit reload Check the status of Monit Restart monit after making the change: $ sudo systemctl restart monit To allow access from a different IP, add it like below: allow 192.268.1.20 You can change admin:monit with username and password you want to use. 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' By default monit HTTP interface is not enabled, enable it by uncommenting the following lines on /etc/monit/monitrc file. Monit has an embedded HTTP interface which can be used to view the status of services monitored and manage services from a web interface. By default all files located on /etc/monit/conf.d/ and /etc/monit/conf-enabled/ are read by monit when it is started, you can place your process monitoring configurations on this directory to keep things organized. This file is highly commented out, you can reference it for all configs. Monit configuration files are located under /etc/monit/ directory.The main configuration file is /etc/monit/monitrc. Jun 06 19:29:37 ubuntu18.04. systemd: Started LSB: service and resource monitoring daemon. Jun 06 19:29:37 ubuntu18.04. monit: * Starting daemon monitor monit Jun 06 19:29:37 ubuntu18.04. systemd: Starting LSB: service and resource monitoring daemon. └─21382 /usr/bin/monit -c /etc/monit/monitrc Loaded: loaded (/etc/init.d/monit generated)Īctive: active (running) since Wed 19:29:37 UTC 1min 45s ago
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |