Listener log check (java)
Job details
Name: |
Listener log check (java) |
Platform: |
Oracle |
Category: |
Availability |
Description: |
This checks and reads errors in database listener log. Using embedded java to read. |
Long description: |
Task checks and reads the database listener log for errors, using embedded java to read. |
Version: |
2.7 |
Default schedule: |
0,10,20,30,40,50 * * * |
Requires engine install: |
Yes |
Compatibility tag: |
.[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’ & enable_java = ‘1′ & (version like ‘10.2%’)] |
Parameters
Name |
Default value |
Description |
listenerlog name |
AUTO |
The name of the Oracle listener log. If set to AUTO, we will try to figure out the listener log file name ourself. |
listenerlog directory name |
AUTO |
The name of the directory we are looking for the listener log in. If set to AUTO, we will try to figure out where the listener log file is located. |
listenerlog error text |
TNS- |
Defines which strings (errors) the Check must look for. Values must be separated with commas (,). Text is case and space sensitive, so “ TNS-, Error” is looking for “ TNS-” and “ Error”, different from “TNS-,Error” which looks for “TNS-” and “Error”. |
listenerlog line HWM |
0 |
Each time the Check read the listener log, it registers how many rows have been checked. The next time |
listenerlog read lines |
4000 |
Number of lines to maximum read on each run. |
listenerlog error text allowed |
TNS-12500 |
Specifies the error strings which are excluded. Values must be separated with commas (,). Text is case and space sensitive, so “ TNS-, Error” is looking for “ TNS-” and “ Error”, different from “TNS-,Error” which looks for “TNS-” and “Error”. This list is filtering away errors found by “listenerlog error text”, so if “TNS-” is searched for in “listenerlog error text” parameter, and “TNS-1521″ is in “listenerlog error text allowed” parameter, then “TNS-1521″ messages are not reported on. |
Job Summary
- Purpose: The purpose of this job is to monitor and check for errors in the Oracle listener log using embedded Java to read the log files and provide insights about potential issues related to database connectivity.
- Why: This job is important to ensure that the Oracle server’s ability to accept incoming connections is not compromised due to errors or issues in the listener logs, which can critically affect the availability and performance of the database.
- Manual checking: You can manually check the listener log by accessing the server and reviewing the log file located in the typical listener directory.
Job Details
- Name: Listener log check (java)
- Category: Availability
- Scope: Oracle database instances with Java enabled and running version like ‘10.2%’
- Description: Monitors the Oracle database listener log for specific error patterns (default “TNS-”) other than the filtered errors (default “TNS-12500″), and records any errors found for further analysis.
- Company: dbwatch.com
- Version: 2.7
- Default Schedule: Triggered every 10 minutes
Job Implementation
- Dependencies:
- Listener log object based on the instance ID
- Various supporting tables and procedures for storing data and error states
- Java Implementation:
- Java routines read specified lines from the listener log.
- Procedures created for reading files, executing commands, and checking file permissions via Java embedded in the database.
- Job Procedure:
- Parameters such as listener log name and directory (set to AUTO by default) determine the log’s location.
- Errors and permitted errors are defined in the parameters; the log is scanned to pick errors while omitting permitted ones.
- Files and lines are read conditionally based on previously read line high water mark (HWM) and line read settings, updating the error history accordingly.
Error Handling and Reporting
- Automated logging: Errors found are stored in the database along with their time of discovery.
- Historic Analysis: Keeps track of when each error occurred, enabling trend analysis over time.
- Warning and Status Messages: If issues are detected during the log check, appropriate warnings and detailed messages are logged, ensuring prompt investigation and resolution is initiated.
- Java Error Handling: Includes exception handling logic for Java errors due to environmental or runtime issues.
dbWatch Reporting Template
- Presents error statistics in a chart format showing the count of errors by date and a list of historical errors with timestamps.
- Scheduled Reporting: Reports are auto-generated every hour to provide updated information on listener log status.
By effectively monitoring and analyzing the Oracle listener logs, this job helps maintain the stability and reliability of database connectivity, which is crucial for the uninterrupted operation of Oracle-dependent applications and services.