LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-06-2013, 10:15 AM   #1
purpman
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Rep: Reputation: Disabled
unable to get tool chain to send daily updates


i am having trouble getting this tool chain to send daily updates.
this is what i want it to do:have server storing security logs and need to contact admin via email in specific risk scenarios(loss of power,hacker attack,virus download,improper login, denied websites) but it also needs to send daily updates. this is what i have but it is not sending daily updates

$ cat my_check.sh
egrep -i 'warn|error' /var/log/messages | mail -s 'issues worth reviewing' some_user@some_host
$ ./my_check.sh
$ crontab -e
#
1 0 * * * /path/to/my_check.sh

any suggestions will be appreciated
 
Old 02-06-2013, 07:54 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,311

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
I'd go step by step.

Step 1:
does it work direct from the cmd line ie
Code:
egrep -i 'warn|error' /var/log/messages | mail -s 'issues worth reviewing' some_user@some_host
If that doesn't work, wrapping it in a script and cron isn't going to help.

If the direct cli call doesn't work, do you see any msgs?
Check the logfiles eg /var/log/messages, /var/log/maillog.
Also, try mailq -Ac, mailq -Lq http://www.oreillynet.com/linux/cmd/...p?path=m/mailq

Tell us what distro & version
Code:
cat /etc/*release*
uname -a
Which MTA ? eg sendmail, postfix... ? Have a look in /etc.
 
Old 02-07-2013, 11:22 AM   #3
purpman
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
tool chain

thank you

egrep -i 'warn|error' /var/log/messages | mail -s 'issues worth reviewing' some_user@some_host

this worked sheesh knew it was something simple
 
Old 02-07-2013, 09:10 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,311

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
So what was the fix: that looks exactly as your original post?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross-tool 0.42: Tool-chain compilation process fail ueagle Linux From Scratch 2 03-26-2011 04:43 AM
Tool chain reubendecruz Linux - Software 1 09-03-2009 08:05 AM
adjusting tool chain chandra123 Linux From Scratch 2 02-17-2008 05:45 PM
Tool chain geek_comp Linux - Software 0 02-20-2006 04:07 AM
what is tool chain? blackzone Linux - Hardware 1 09-23-2004 05:30 AM


All times are GMT -5. The time now is 11:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration