Listener log check
Job details
Name: |
Listener log check |
Platform: |
Oracle |
Category: |
Availability |
Description: |
This checks and reads errors from the database listener log. Using Oracle native code to read. |
Long description: |
This checks and reads errors from the database listener log. Using Oracle native code to read. |
Version: |
1.8 |
Default schedule: |
7,27,47 * * * |
Requires engine install: |
Yes |
Compatibility tag: |
.[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’ & (version like ‘10%’) & _priv_read_dba_directories = ‘1′ & can_get_grant_create_any_directory=‘1′] |
Parameters
Name |
Default value |
Description |
listener log name |
listener.log |
The name of the Listener log file. |
listener log path |
null |
The path name of the Listener log file which is used to create directory object. |
listener log directory name |
DBW_LISTENER_DIR |
The name of the directory object created with the DDL – “create directory”. |
listener log error text |
TNS- |
Defines which strings (errors) the Check must look for. Values for this parameter must be |
listener log line HWM |
1 |
Each time the Check read the listener log, it registers how many rows have been checked. |
listener log max lines |
200000 |
If the listener log has more lines than the value of this parameter, then the Check terminates |
listener log max elapsed time |
60 |
Define the maximum elaps time the Check can execute (values are in seconds). If the execution ‘ |
|
|
listener log error text allowed |
TNS-12500 |
Specifies the error strings which are excluded. |
Job Summary
- Purpose: The purpose of this job is to monitor and check errors in the database listener log specifically for Oracle instances.
- Why: This job is crucial as it ensures that any errors that might affect database connectivity or performance are quickly identified and addressed. Monitoring the listener log helps in proactive maintenance and avoiding potential downtime or performance issues.
- Manual checking: You can manually check the database listener log by accessing the log file directly on the server or through database queries if the log is stored in a database accessible format.
Job Details
- Name: “Listener log check”
- Description: This monitors and reads errors from the database listener log using Oracle native code.
- Category: “Availability”
- Version: 1.8
- Company: dbwatch.com
- Default Schedule: Executes at 07, 27, and 47 minutes past every hour.
Dependencies and Pre-Implementation
- The job has dependencies on its own previous runs and some procedures belonging to the alert_log check. It ensures those procedures and checks are in place before running.
- Before implementation, the job ensures that the necessary directory privileges are granted for accessing or creating necessary directories.
SQL for Pre-Implementation Privilege Check
grant CREATE ANY DIRECTORY to ";;inst-user;;"
Core Implementation
- The implemented procedure reads from the listener log, checks for specified error texts, and handles large logs efficiently by truncating or skipping already read lines.
- Parameters like listener log path, name, error texts, and thresholds for line numbers and execution time are customizable.
- Error handling is robust, capturing any exceptions and recording them in a defined error table.
Output and Reporting
- Generates a report based on the listener log check, displaying errors and statuses that help in proactive management of the database environment.
Example Report Output
Log Text |
Error on listener at 10:10 PM – TNS-00515: Connection Closed |
Conclusion
- The monitoring job for dbWatch Control Center focused on Oracle listener logs is vital for maintaining database availability and performance by detecting and addressing potential connectivity issues or errors in real-time.