Monit is a free open source utility for managing and monitoring; networks, processes, programs, files, directories and filesystems on a UNIX system. Monit can conduct automatic maintenance and repair and can execute meaningful causal actions in error situations.
Note: AstLinux 1.2.2 or later is required
The AstLinux Web Interface is used for configuration, click on Configure Monit
Network tab → Network Services:
Enable by clicking on “Configure Monit” and enable “Monitoring”, additionally you will have a few options:
Tip -> If your Monit config includes a “check network” for a 1 GB interface, it is suggested to set the “Check Interval” to 30 seconds.
The “To” address entry may include multiple space separated email addresses. Monit doesn't work with msmtp-aliases!
But you can define multiple alert user@example.com
entries in the Monit config (one line per entry).
Note -> Multiple email addresses currently do not work, neither global nor local! Only the last email address is used (patch is in work!)(2020-06-08)
The configuration is autogenerated. You just need to enable Monitoring and enter the Monit notification email address.
Once Monit has been enabled and restarted, the Monit services may be customized by using the Edit tab…
Or use the CLI and edit the file: /mnt/kd/monit/monit.d/services.conf
Note that all filenames matching /mnt/kd/monit/monit.d/*.conf
will be included in the configuration.
Apply changes by restarting Monit.
Tip -> From the CLI, a handy command to check the syntax of your monitrc
file and all included monit.d/*.conf
files…
monit -t
should respond with something like: Control file syntax OK
If you need a more specialized base configuration, copy /etc/monit/monitrc
to /mnt/kd/monit/monitrc
, edit it and restart Monit.
By default the Monit tab is not shown, enable it via the Prefs tab…
The “Monit Service Manager” may be explored by using the Monit tab:
Tip -> If you prefer to view the “Monit Service Manager” in a separate browser window, ex. for host “pbx” use URL:
https://pbx/admin/monit/
The documentation can be found at:
http://mmonit.com/monit/documentation/monit.html
Most recent sample monitrc
configuration file:
If you need to debug Monit for some reason:
service monit stop monit -c /etc/monit/monitrc -vv -I 2>&1 | tee /mnt/kd/monit_debug.log