LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 09: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, 06:54 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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, 10: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, 08:10 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

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


Reply



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 03:43 AM
Tool chain reubendecruz Linux - Software 1 09-03-2009 07:05 AM
adjusting tool chain chandra123 Linux From Scratch 2 02-17-2008 04:45 PM
Tool chain geek_comp Linux - Software 0 02-20-2006 03:07 AM
what is tool chain? blackzone Linux - Hardware 1 09-23-2004 04:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration