bibi92
asked on
find the errors in a log
Hello,
I want to find the errors in a log over a number of days defined in parameter.
$LogFile = "C:\ORA\alert.log"
On the log 05/11/2021 09:00:49 ORA-00600
Thank you
Regards
I want to find the errors in a log over a number of days defined in parameter.
$LogFile = "C:\ORA\alert.log"
On the log 05/11/2021 09:00:49 ORA-00600
Thank you
Regards
ASKER
No I search how to get errors on last number od days passed in parameter.
Thank you
Best regards
Thank you
Best regards
Then you need to provide information about the exact format of a line that identifies an error.
ASKER
Hello,
On prompt specify the number lastdays, exAmple 3
$LogFile = "C:\ORA\alert.log"
On the log 05/06/2021 09:00:49 ORA-00600
On the log 05/07/2021 09:00:49 ORA-00600
On the log 05/08/2021 09:00:49 ORA-00600
On the log 05/09/2021 09:00:49 ORA-00600
On the log 05/10/2021 09:00:49 ORA-00600
On the log 05/11/2021 09:00:49 ORA-00600
Return only errors from 05/09/2021 and 05/11/2021
Thank you
Best regards
On prompt specify the number lastdays, exAmple 3
$LogFile = "C:\ORA\alert.log"
On the log 05/06/2021 09:00:49 ORA-00600
On the log 05/07/2021 09:00:49 ORA-00600
On the log 05/08/2021 09:00:49 ORA-00600
On the log 05/09/2021 09:00:49 ORA-00600
On the log 05/10/2021 09:00:49 ORA-00600
On the log 05/11/2021 09:00:49 ORA-00600
Return only errors from 05/09/2021 and 05/11/2021
Thank you
Best regards
Forgive me, but I somewhat doubt that the actual line in the log file reads
So, again: among all the lines of the log file, how exactly can a line to be identified as "error"? Please provide some actual sample lines, taken straight from the log.
On the log 05/10/2021 09:00:49 ORA-00600
As this involves parsing strings, you need to provide exact sample lines.So, again: among all the lines of the log file, how exactly can a line to be identified as "error"? Please provide some actual sample lines, taken straight from the log.
Easy way to do this will be to write a script which will...
1) Determine "now" (current date + time).
2) Subtract some number of days, using something like PERL's Date::Manip date calculator... something like this...
3) Then craft code to parse + compare your date.
4) Print out any log line > $base ($now - $days to check).
Not overly complex code, just unique for every log format, so no... somehow... off the shelf tool that understands... every log format....
5) Fail2Ban can come close to this, so you might look into one of the many Windows ports of Fail2Ban.
1) Determine "now" (current date + time).
2) Subtract some number of days, using something like PERL's Date::Manip date calculator... something like this...
# Logical math, not actual code...
my $base = $now - 5 days;
3) Then craft code to parse + compare your date.
4) Print out any log line > $base ($now - $days to check).
Not overly complex code, just unique for every log format, so no... somehow... off the shelf tool that understands... every log format....
5) Fail2Ban can come close to this, so you might look into one of the many Windows ports of Fail2Ban.
ASKER
Hello,
Thank you the log contains every day the same error :
05/06/2021 09:00:49 ORA-00600: code d'erreur interne, arguments : [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
05/07/2021 09:00:49 ORA-00600: code d'erreur interne, arguments : [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
05/08/2021 09:00:49 ORA-00600: code d'erreur interne, arguments : [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
05/09/2021 09:00:49 ORA-00600: code d'erreur interne, arguments : [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
05/10/2021 09:00:49 ORA-00600: code d'erreur interne, arguments : [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
05/11/2021 09:00:49 ORA-00600: code d'erreur interne, arguments : [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
Thank you
regards
Thank you the log contains every day the same error :
05/06/2021 09:00:49 ORA-00600: code d'erreur interne, arguments : [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
05/07/2021 09:00:49 ORA-00600: code d'erreur interne, arguments : [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
05/08/2021 09:00:49 ORA-00600: code d'erreur interne, arguments : [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
05/09/2021 09:00:49 ORA-00600: code d'erreur interne, arguments : [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
05/10/2021 09:00:49 ORA-00600: code d'erreur interne, arguments : [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
05/11/2021 09:00:49 ORA-00600: code d'erreur interne, arguments : [kdsgrp1], [], [], [], [], [], [], [], [], [], [], []
Thank you
regards
Now you need to solve the Oracle issue. Probably another set of people
https://support.oracle.com/knowledge/Oracle%20Database%20Products/1492150_1.html
https://support.oracle.com/knowledge/Oracle%20Database%20Products/1492150_1.html
ASKER
Hello,
Thank you it isn't the question. I have already open a case on Oracle Support for ORA-00600 but we need to monitoring error on alert.log
Best regards
Thank you it isn't the question. I have already open a case on Oracle Support for ORA-00600 but we need to monitoring error on alert.log
Best regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Shell script for monitoring Alert log DBACLASS