Sunday, September 11, 2011

Notes - Monitor an event and send email when it occours

tail -f /var/log/messages | awk '/now/ {system("mail -s 'hi' myemail@mydomain.com < /dev/null")}'

interesting for /var/log/auth for example...

No comments:

 

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.