Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Monitoring & emailing log files Post 302147808 by vgersh99 on Wednesday 28th of November 2007 03:37:47 PM
Old 11-28-2007
It sounds like the algorithm is pretty clear in your head.
Yes you need to write a collector/parse that would have 2 parameters:
  1. path to the log file to parse
  2. path to the file that holds the last known line number examined/parsed by the parser
The parser you read the 'line number' from the 'line number' file and start its parsing of the log file from the next line.
Once the entire file is parsed and the 'offending' records/lines are collected (most likely in another file), the parser will email the collected entries/files to the configured (either in the configuration file OR specified on the command line) list of the email address(es).
Once the emailing is done, the parser will update the 'line number' file with the number of the LAST parsed line in the file.

You should probably make provisions to make sure that there's only ONCE instance of the parser running at the time in order to avoid any collisions.

Now it's a matter of a simple programming....
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl - Emailing MULTIPLE files as attachment

Hi Guys, I would love an example as to how I can send multiple files in one email using perl. The file types are .csv I have read that mimencode is required? Is there any other way or is that it? Thanks :) (3 Replies)
Discussion started by: Tonka52
3 Replies

2. UNIX for Advanced & Expert Users

AFP & FTP Bandwidth Monitoring?

Is there a way to monitor FTP and AFP bandwidth on a per user basis? AFP = AppleFilesharingProtocol, and by monitor, I don't mean graphs, I mean getting raw byte counts I can use in my scripts any way I choose. I am attempting to use mod_watch to monitor virtual domain bandwidth usage, but I really... (0 Replies)
Discussion started by: l008com
0 Replies

3. Shell Programming and Scripting

Copying files and emailing them out

Hello everybody, I'm trying to create a script that will cd into a directory and then copy the file with yesterday's date on it and then cd into another directory doing the same thing. Afterwards, i'm trying to zip up the two files, and email them out to people. Can anyone help? thanks a... (1 Reply)
Discussion started by: jhofilena
1 Replies

4. Shell Programming and Scripting

Monitoring specific string or keyword in rotating log files.

Hi there, I like to ask how i shall monitor specific string or keyword in rotating log files. e.g. I have at 10 rotating logfiles. I use the command below to grep the string, but eventually become non functional because the logfile rotates and new logfile is active. tail -f <logfile1> |grep... (1 Reply)
Discussion started by: shtobias
1 Replies

5. Shell Programming and Scripting

Need to count files & create log of that.

Hi Friends, I need some help. First look at my files hierchachy /<level-1>/<level-2>/<level-3>/*.tif eg. : /2010-07-01/AFFIDAVIT-OF-SERVICE---FOR-SC/001/Babylon2_20100701012049_1278004849.49892_000.tif... (2 Replies)
Discussion started by: paragnehete
2 Replies

6. Solaris

Monitoring log file for entries - Find command & sorting

hi, I would like to monitor a log file, which rolls over, everytime a server is restarted. I would like to grep for a string, and to be more efficient i'd like to grep only newly appended data. so something like a 'tail -f' would do, however, as the log rolls over i think a 'tail -F' is... (2 Replies)
Discussion started by: horhif
2 Replies

7. UNIX and Linux Applications

SAP & DB2 Process Monitoring Parameters

What are the parameters ((i.e., Process & Services) need to monitor for SAP & DB2 to capture shutdown, restart & Halt status of those applications. Please suggest the best practices. Ex: SAPSTART for SAP & DP2SYS for DB2 (3 Replies)
Discussion started by: marunmeera
3 Replies

8. Shell Programming and Scripting

CLI script for emailing alert if files missing in dir

thread removed (4 Replies)
Discussion started by: billabongjimmy
4 Replies

9. Shell Programming and Scripting

Crontab 2>&1 not emailing

I have a script that emails me when I run it manually, but the crontab I'm using must be 'silencing' the output? Here's what I have: */15 * * * * /usr/src/blah.sh > /dev/null 2>&1 I don't want it to email me every time it runs, just when I run the sendmail command inside the script if the... (13 Replies)
Discussion started by: unclecameron
13 Replies

10. UNIX for Advanced & Expert Users

Solaris 10 & 11 ZFS Space Monitoring

Hi Folks! Its been a while since I worked with ZFS but basically, I need to monitor free space for Solaris 10 & 11 systems (with & without zones) I am hoping that any space commands only need to be run from the global zone (to simplify matters) However, I'm not not sure if there are exceptions... (2 Replies)
Discussion started by: GazinLincoln
2 Replies
install-solaris(1M)													       install-solaris(1M)

NAME
install-solaris - install the Solaris operating system SYNOPSIS
install-solaris install-solaris invokes the Solaris Install program. Depending on graphical capability and available memory at the time of invocation, install-solaris invokes either a text-based installer or a graphical installer. The following minimum requirements for physical memory dictate which features are available during installation: For SPARC machines: 128 MB Minimum physical memory for all installation types 128 MB Minimum physical memory required for windowing system 384 MB Minimum physical memory required for graphical-based installation For x86 machines: 256 MB Minimum physical memory for all installation types 256 MB Minimum physical memory required for windowing system 512 MB Minimum physical memory required for graphical-based installation In some cases, even if the minimum physical memory is present, available virtual memory after system startup can limit the number of fea- tures available. install-solaris exists only on the Solaris installation media (CD or DVD) and should be invoked only from there. Refer to the for more details. install-solaris allows installation of the operating system onto any standalone system. install-solaris loads the software available on the installation media. Refer to the for disk space requirements. Refer to the for more information on the various menus and selections. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcdrom (Solaris instal- | | |lation media) | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ pkginfo(1), install(1M), pkgadd(1M), attributes(5) It is advisable to exit install-solaris by means of the exit options in the install-solaris menus. 23 Sep 2005 install-solaris(1M)
All times are GMT -4. The time now is 06:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy