Swatchdog-Simple Log File Watcher in Real-Time in Linux

Step1. Install the epel repository

yum install epel-release

Step2. Install the swatch

yum install swatch    

Step3. Create a Configuration file

touch /home/vagrant/.swatchrc

vi /home/vagrant/.swatchrc
watchfor  /sudo/
     echo red
     mail=admin@domain, subject="Sudo Command" 

Step4. Run tool

swatch

Step5. Check logs

cat /var/log/messages

LEAVE A REPLY

Please enter your comment!
Please enter your name here