Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.37 KB

README.md

File metadata and controls

34 lines (26 loc) · 1.37 KB

root_monitoring

This is monitoring files written in Perl. I use them on Amazon Linux.

It checks server resource and daemon status and sends e-mail.

Usage

Set up

  1. update monitoring/config.pl to adapt to your server.
  2. sudo file/root_setup.sh development ap for development application server
    sudo file/root_setup.sh development mail for development mail server
    sudo file/root_setup.sh production ap for production application server
    sudo file/root_setup.sh production mail for production mail server
    You can execute the above command everywhere.
    Then, required Perl files are copied to root directory.

Feature

This checks resource and service status.
root_setup.sh set the crontab to execute resource_check.pl every 3 minutes and service_check.pl every day.

for Application Server

  • Service Check: check nginx status, and when they're down, reboot them and send mail.

for Mail Server

  • Service Check: check saslauthd and postfix status, and when they're down, reboot them and send mail.

for Every Server

  • Resource Check: send the results of df -h and free -m as e-mail.

Customization

  • If you want to check another services, change root_setup.sh and service_check.pl.
    • root_setup.sh defines programs to be checked according to the server type (ap or mail).
    • service_check.pl defines program information to be checked.