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′ & eleven_and_above = ‘1′] |
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 monitoring job is to periodically check for errors in the Oracle Listener log using Java embedded functionalities. It aims to promptly identify and address issues in the database environment to ensure continuous system availability and reliability.
- Why: This job is important because monitoring the listener log helps in detecting and diagnosing Oracle network-related issues early, which could potentially prevent more serious system disruptions. Regular checks on the listener log can also help in compliance with database audit and security policies.
- Manual checking: You can check errors in the Oracle database listener log manually by inspecting the log file located typically in the Oracle directory structure under the “network/log” subdirectory. The specific SQL commands to manually check listener logs will depend on your database configuration but generally involve querying listener-related views or directly accessing the log files.
Implementation Details
Task Setup
- Listener Log Name and Directory: Automatically determines the log file name and directory if not specified; otherwise, uses the user-defined settings.
- Error Text: Specifically looks for errors that start with “TNS-” but allows for specified error texts to be ignored through the ‘listenerlog error text allowed’ parameter.
- High Water Mark and Read Lines: Keeps track of the last line checked to avoid reprocessing the whole log file and defines the number of lines to read in each execution.
Dependencies
- Several database objects like `dbw_listener_data_#instance~id#` and procedures such as `DBW_LISTENER_READFILENLINES_#instance~id#` ensure the sequential and error-free checking of the listener log.
Java Implementation
- Various Java procedures are deployed to manage file checking, command execution, and line-by-line analysis of the log file. Errors detected are processed and compared against allowed error texts to filter out false positives.
Error Handling
- Comprehensive error handling through PL/SQL and Java ensures the capture and logging of any issues encountered during execution, including file permissions and SQL exceptions. An alert system is also in place to inform relevant personnel about any critical issues identified during log scans.
Report Generation
- Content: The dbWatch job generates reports that summarize listener log check activities, listing new errors found and providing historic context on previously logged errors.
- Utility: These reports help system administrators and database specialists quickly understand the current status and health of the database listener, facilitating informed decision-making regarding potential maintenance or configurations changes.
Overall Importance
This dbWatch job plays a crucial role in proactive database management and operational stability, directly contributing to the system’s efficiency and robustness by ensuring that all listener-related issues are promptly caught and addressed.