Software to monitor the logs dynamically


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Software to monitor the logs dynamically
# 1  
Old 08-15-2013
Computer Software to monitor the logs dynamically

Hi Folks,

I have to monitor the logs for exceptions and the logs will be dynamic and will keep updating now one way is to use the command on putty that is tail -f but could you please advise any software in which I can dynamically monitor the logs and if an exception come it highlights thos immediately , Thanks in advanceSmilie
# 2  
Old 08-15-2013
Quote:
Originally Posted by tuntun27272727
Hi Folks,

I have to monitor the logs for exceptions and the logs will be dynamic and will keep updating now one way is to use the command on putty that is tail -f but could you please advise any software in which I can dynamically monitor the logs and if an exception come it highlights thos immediately , Thanks in advanceSmilie
First off, tail -f is not a Putty command. Putty is a Telnet/SSH client that you can use to connect to a server, and tail -f is a command of its operating system.
  1. What do you mean by exception? An error?
  2. What are the logs that you want to monitor? Is it a fixed list?
  3. Are you looking for a custom software to perform this task or are you planning on writing a script yourself to do the job?
  4. What Unix flavor are you using? (Linux, Solaris, AIX, etc.)

Once you state the answer to those questions there will be a lot of people that will be willing to help you, including myself.
# 3  
Old 08-15-2013
To monitor ( that means continuously ...) is the aim of all monitoring software, the difference between them is how much $$$ you need to invest to get them doing what you want, the more you pay your software the more predefined automation routines they have ( normally...) and so easy to get working almost out of the bag...
Using open source means you will have to do quite some configuration... but it works and is free
# 4  
Old 08-15-2013
You could of course do
Code:
 tail -f <file-in-question> | my.cheapscript.sh

and my.cheapscript.sh could continue to loop and process whatever...
Code:
#my.cheapscript.sh
while read a 
do
<<insert magic here>>
done

You'll have to make sure that you insure you are at the latest version of the file you are monitoring since even dynamic files have to be pruned. It depends on how the dynamic log file is being written to....does the process keep it open while it's logging...do an fuser <log-file> to see if there is a process pid associated with it. If so then in you cheap script you can save the pid (before the while loop).
If the file gets renamed or deleted you'll need to check for a new version of the file and the tail will break. You could do this all in a single script file and not have to tail to a script file...perhaps something like
Code:
#my.cheap.script.too.sh
FILE_TO_MONITOR="some-file.log"
while ((1)) 
do
tail -f ${FILE_TO_MONITOR} | while read a
do
<<magic>>
done

I am not 100 percent sure that's bullet proof but you get the idea.

Last edited by blackrageous; 08-15-2013 at 05:55 PM..
# 5  
Old 08-15-2013
How large are the files?
How often do you want to check?
How do you want to highlight exception?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If I ran perl script again,old logs should move with today date and new logs should generate.

Appreciate help for the below issue. Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt.............. 1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies

2. Infrastructure Monitoring

Searching for Saas Monitor service which monitor my servers which are sitting in different providers

Sorry if this is the wrong forum Searching for Saas Monitor service which monitor my servers which are sitting in different providers . This monitor tool will take as less CPU as possible , and will send info about the server to main Dashboard. The info I need is CPU / RAM / my servers status (... (1 Reply)
Discussion started by: umen
1 Replies

3. Shell Programming and Scripting

[Help] Script to monitor logs

Hello friends, as they are? First of all sorry for my poor English. I tell them what is my problem. I have the following script, which is basically what makes error search for a pattern within a folder containing logs. The script works fine, the problem is that whenever I find a pattern of new... (2 Replies)
Discussion started by: romanrsr
2 Replies

4. Shell Programming and Scripting

Monitor logs for exception and if exception come then sent an email

Hi Folks, please advise , I have logs generated on unix machine at location /ops/opt/aaa/bvg.log , now sometimes there come exception in these logs also, so I want to write such a script such that it should continuously monitor these logs and whenever any exception comes that is it try to find... (3 Replies)
Discussion started by: tuntun27272727
3 Replies

5. Red Hat

Want to Monitor the Pidgin Logs

Hi Team, Am the Root user I want to monitor the user's chat actions. So How do I check the Remote system users Pidgin Chat logs history. And where the logs will be stored exactly?? Give me a solution!! (2 Replies)
Discussion started by: Adhi
2 Replies

6. Shell Programming and Scripting

monitor new logs

I would like to monitor logfile for specific keyword and send email once detected. I'm trying out the code here, the script is scheduled to run every minute. Everytime it runs, the same log will be detected and send email. Anyway it can be improved to detect only new logs? tail -f /logfile |... (2 Replies)
Discussion started by: gklntn
2 Replies

7. UNIX for Dummies Questions & Answers

how to view dynamically updated managed server logs from the same putty window

Hi, I want to know how we can view two or three logs which are dynamically getting updated from a single/same putty window with tail commnad. Thanks. (7 Replies)
Discussion started by: reachsudha
7 Replies

8. Solaris

Logs Analysis Software ?

Hi, What is the best log analysis software for Solaris ?? Regards (3 Replies)
Discussion started by: adel8483
3 Replies
Login or Register to Ask a Question