your log files has to be consistent since this will grab the last 21 characters from the log file name, btw, if you want to remove the counta you could and you won't get the line number on each output.
if you need further editing to the script, try doing it yourself and post it here and I will do my best to help you out
Hi All,
I have a question and hope someone will have an answer to that. I'm looking for a way to monitor log files being generated on a windows machine for some specified string and if its occurrence is found, raise an alarm though email. The log file size keeps on increasing and after a... (2 Replies)
hi All,
how to find a pattern in the log file & display the above and below line
for example in the log file, i have many lines, whenever i search for "Category" it should display the above line with only few parameter like i want only the location name & department name
Thu Jul 02 11:05:23... (2 Replies)
Hello,
I want something like this
tail -f /a/b/c/*.log | grep -i "STRING1|STRING2 " > a.txt
I want to check all the log files in a particular directory then grep if any of the log files have "STRING1" and "STRING2" string and then have to send email to the group.
Platform is HP-UX
it... (8 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write an automated shell program(s) that can create, monitor the log files and report the issues for matching... (0 Replies)
AM in need of some plugin/script that can monitor HP-UX file "/var/opt/resmon/log/event.log" .
Have written a scrip in sh shell that is working fine for syslog.log and mail.log as having standard format, have interrogated that to Nagios and is working as I required .
But same script failed to... (3 Replies)
Hi,
Have written a script to monitor linux non standard log file based on line numbers, so each check store $otalinenum ..
then in next check after 10 minutes it compre the current_total_line_num > last_total_line_num then it will parse the log file from last_total_line_num to... (0 Replies)
Hi,
I need to amend an existing ksh script so that it runs a process (stop weblogic) and in parallel needs to monitor a log file (startup.log) in the background for a certain string (e.g. unable to stop weblogic). If the string appears in the log i need to kill the stop weblogic process.
... (5 Replies)
is there a way to efficiently monitor logfiles that do not have a date or time format? i have several logs on several different servers that need to be monitored. but i realized writing a script for this would be very complex and time consuming giving the variety of things i need to check for i.e.... (2 Replies)
Hi,
I need to grep a pattern in the log file of a process and send a mail if pattern found.But I am not able to figure out how do I detect when the process comes UP,it is started several times a day and each time it is started I need to perform this action. Please suggest something. (3 Replies)
Hello All,
I want to write a script to monitor my product logs from /var/log/messages and send notifications without using "tail -f" command.Please suggest alternatives and any other tools for monitoring and alerting.
Thank You (1 Reply)
Discussion started by: Cva2568
1 Replies
LEARN ABOUT DEBIAN
grokevt-addlog
grokevt-addlog(1)grokevt-addlog(1)NAME
grokevt-addlog - A tool for adding a raw event log to an existing GrokEVT database.
SYNOPSIS
grokevt-addlog database-dir evt-file new-type base-type .SH DESCRIPTION grokevt-addlog takes a raw event log (.evt file) and adds it to a
pre-built database generated by grokevt-builddb(1). This new log file will be set up to use the message templates of another log, as deter-
mined by the user.
This tool is primarily useful for processing deleted logs and log fragments found on a system. While it is possible to use the database
generated from one system with the logs of another, this is not recommended for investigations unless no alternatives exist.
ARGUMENTS
grokevt-addlog uses the following arguments:
database-dir
The base directory for the database generated previously by grokevt-builddb(1).
evt-file
The file to be added to the database.
new-type
The new log type/name that evt-file will take on. This is the name that will need to be used later with grokevt-parselog(1) to
access the new log. This type must not already exist in the database.
base-type
The existing log type that this new log will be based on. The message templates from this type will be used with the new log when
parsing. This type must exist in the current database.
BUGS
Probably several. This particular script has not been extensively tested.
CREDITS
Written by Timothy D. Morgan.
Copyright (C) 2006-2007 Timothy D. Morgan
LICENSE
Please see the file "LICENSE" included with this software distribution.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details.
SEE ALSO grokevt(7)grokevt-builddb(1)grokevt-dumpmsgs(1)grokevt-findlogs(1)grokevt-parselog(1)grokevt-ripdll(1)File Conversion Utilities 20 March 2008 grokevt-addlog(1)