check directory of oracle logs

1.1k views Asked by At

I'm using the check_logfiles nagios plugin to monitor Oracle alert logs. It works wonderfully for that purpose.

However I also need to monitor and entire directory of oracle trace logs for errors. This is because the oracle database is always creating new log files with different names.

What I need to know is the best way to scan an entire directory of oracle trace logs to find out which ones match patterns that specify oracle alerts.

Using check logfiles I tried specifying these options -

--criticalpattern='ORA-00600|ORA-00060|ORA-07445|ORA-04031|Shutting
 down instance'

and to specify the directory of logs -

--logfile='/global/cms/u01/app/orahb/admin/opbhb/udump/'

and

--logfile="/global/cms/u01/app/orahb/admin/opbhb/udump/*"

Neither of which have any effect. The check runs but returns ok. Does anyone know if this nagios plugin called check_logfiles can monitor a directory of files rather than just a single file? Or perhaps there is another, better way to achieve the same goal of monitoring a bunch of files that can't be specified ahead of time?

1

There are 1 answers

0
Paul Sweatte On

Use a script which:

  • Opens each file
  • Copies entries which match the pattern
  • Outputs the matches to a file