Hi folks,
I need scripts for the logs like user login,user logout ,if the disk usage is full ,disk size etc etc so i should get triggered via mail to my mail id
I want to make scripts and it automatically triggered as per the requirement.
please help me in this!!!
kshitij totare <kshitij13093@gmail.com>
Look for first part of your request, you can get logs of any user authentication or failure in /var/log/secure file by default, and if you wish to check size of disk after periodic and if its more than some value then schedule your script in cron,
now its your logic how you get that value and embed in your mailx command.
Sample example is here, for your script, offcource you can change according to your need ;)
for x in `df -h | awk '{print $5}'|cut -d"%" -f1`
do
if [ $x -ge 80]
then
mailx "ALERT FOR FS MORE THAN 80%"
xyz@abc.com
if
done
Sagar B <forlinuxdata@gmail.com>
Hello,
Kindly google for :
1) logwatch configuration in linux
2) ossec configuration linux
It will provide you lots of information about server in mail.
$$$ <swapnilsawant2401@gmail.com>
No comments:
Post a Comment