LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-09-2011, 11:23 AM   #1
RAVINDER_KUKREJA
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Rep: Reputation: Disabled
monitoring logfile


Suppose logs are updating in regular log file..I just want to automate with the script when there is no logs updation..i have url with me from where i can get alerts.

Last edited by RAVINDER_KUKREJA; 08-09-2011 at 11:27 AM.
 
Old 08-09-2011, 01:06 PM   #2
tinyTux
Member
 
Registered: Mar 2011
Location: Extended Memory
Distribution: Gentoo
Posts: 64

Rep: Reputation: 9
Quote:
Originally Posted by RAVINDER_KUKREJA View Post
Suppose logs are updating in regular log file..I just want to automate with the script when there is no logs updation..i have url with me from where i can get alerts.
I don't want to waste your zero reply status. However, I am fairly certain that the reason no one has responded is because no one understands your question. Please rewrite your question with more detail. You may also want to have someone help you with your English if that is an issue.
 
0 members found this post helpful.
Old 08-09-2011, 01:08 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,211

Rep: Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612
I read this earlier. I am usually able to get some kind of clue of what someone is talking about, but in this case I really got nothing. No idea what this is referring to.
 
0 members found this post helpful.
Old 08-09-2011, 01:45 PM   #4
xwjitftu
Member
 
Registered: Aug 2011
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 1
And please mark your subject as something meaningful, not just "help".
 
0 members found this post helpful.
Old 08-10-2011, 08:08 AM   #5
RAVINDER_KUKREJA
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Set alerts for a log while when it stops updating

Hi All,

I have a log file which keeps on updating with time i.e.

bmg@CCHNUSSDAPZP01 edr]$ ll pullprocessoredr.log*
-rw-rw-r-- 1 bmg bmg 928660 Aug 10 17:34 pullprocessoredr.log
-rw-rw-r-- 1 bmg bmg 30147 Aug 10 00:59 pullprocessoredr.log_2011-08-10-00.gz

when the logs stop updating then I want to set alerts for it. There are no exceptions coming in these log files when it stops updating. Kindly suggest

Thanks in advance
 
Old 08-10-2011, 08:13 AM   #6
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,275

Rep: Reputation: 148Reputation: 148
SNMPtrap, monitoring tools like Nagios...
 
1 members found this post helpful.
Old 08-10-2011, 01:44 PM   #7
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
RAVINDER_KUKREJA, if you're finding someone's solution unhelpful, you need to respond with why, perhaps giving more details about your question/problem so that people can provide better answers. I'm assuming, of course, that you're the one who's marking responses to your threads as such, obviously.
 
1 members found this post helpful.
Old 08-10-2011, 02:15 PM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

Have a look at logwatch, write your own scripts or use a monitoring tool as suggested by kirukan, whose post didn't need negative rep as pointed out by Nylex. May I offer you some friendly advice? Have a look at Google before asking general questions of that kind. You will learn a lot more trying to find out something and/or following instructions you've found online.

Kind regards,

Eric

Last edited by EricTRA; 08-10-2011 at 02:16 PM. Reason: Typo
 
1 members found this post helpful.
Old 08-10-2011, 05:37 PM   #9
priyophan
Member
 
Registered: Apr 2009
Posts: 36

Rep: Reputation: 0
1. First of all check the intervals in which the logs are getting updated (say 5 mins )

schedule the following script in cron every 5 mins if your script gets updated within 5 mins to send an alert mail in case it is not getting updated .

Note :- Please check out for mistakes in the script , i just type it in there .

#!/bin/bash

#######################################START OF SCRIPT##########################################
logfile=SPECIFYNAME

if [ -f /tmp/acctime ]
then
acctime=`cat /tmp/acctime`
fi
newacctime=`ls -ltr | awk '{print $8}' $logfile`
echo $newacctime > /tmp/acctime
if [ $acctime=$newacctime ]
then
echo "Please check logs or whatever message" | mailx -s "Log files update message" receiver@abc.com
fi
####################################END OF SCRIPT#################################
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell scripting: Print output to logfile, error to logfile & screen stefanlasiewski Programming 18 05-22-2008 01:47 PM
Monitoring free memory with enterprise monitoring application Steelb Linux - Enterprise 2 02-13-2008 11:10 AM
when/where to open logfile? vegas35 Programming 7 10-10-2007 08:41 AM
Get IP from logfile Manana Linux - Software 1 03-20-2007 07:56 AM
pam_unix in logfile jkmartha Linux - Newbie 1 05-04-2005 10:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:14 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration