Instance error log
Job details
Name: | Instance error log |
Platform: | Sqlserver |
Category: | Availability |
Description: | Reads and checks the Instance error log file by using the sp_readerrorlog stored procedure. |
Long description: | The sp_readerrorlog stored procedure allows to read the contents of the SQL Server error log file. This procedure checks for errors defined by the ‘error text’ parameter. |
Version: | 1.4 |
Default schedule: | 6,26,46 * * * |
Requires engine install: | Yes |
Compatibility tag: | .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2005′ & hasengine=‘YES’ & engine_edition = ‘Microsoft SQL Server’ & eng_inst_priv = 0] |
Parameters
Name | Default value | Description |
---|---|---|
error text | failed, error | Defines which strings (errors) the Check must look for. Values must be separated with commas (,). |
error text allowed | Log\ERRORLOG, informational message only,log has been reinitialized, 0 errors | Specifies the text strings which make errors (specified by the “error text” parameter) to be excluded when found in the same record (error log line). |
history threshold | 1000 | The maximum numbers of error messages the history table will keep (error_log_err_histr_tab table). |
last run | The last time the error log has been checked. | |
max lines per execution | 5000 | The maximum number of lines the Alert will read during execution before a warning/alarm is raised. |
return status | 0 | Return status value (ALARM – 2, WARNING – 1, or OK – 0) when “error text” is found (or “max lines per execution” is reached. |
max elap time | 180 | The maximum execution time (in seconds) for the Alert. If this threshold is reached a warning is raised. |
Monitoring Job Summary for dbWatch Control Center
Purpose: The purpose of this job is to monitor the Microsoft SQL Server’s instance error logs to detect and react to specific error texts that are defined by user inputs. This monitoring ensures that potential issues are identified and addressed swiftly to maintain system stability and reliability.
Why: This job is important because it helps in:
- Identifying critical errors quickly, thereby allowing for immediate corrective action.
- Maintaining system health by monitoring the error logs for any signs of underlying problems.
- Reducing manual checks and automating the process of error monitoring.
Manual checking: You can check this manually in the SQL Server by issuing the following SQL command:
EXEC xp_readerrorlog;