Instance error log file size check


Job details

Name: Instance error log file size check
Platform: Sqlserver
Category: Capacity
Description: Checks the size and the Instance error log file by using the extended stored procedure xp_cmdshell.
Long description: The xp_cmdshell stored procedure allows to read the contents of a directory.
Version: 1.5
Default schedule: 7 7 * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2005′ & hasengine=‘YES’ & eng_inst_priv = 0 & (engine_edition = ‘Microsoft SQL Server’ engine_edition = ‘Azure SQL Managed Instance’)]

Parameters

Name Default value Description
history threshold 30 The maximum numbers of history statistics (in days) of ERRORLOG file size.
return status 0 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when the “* threshold” parameters are reached.
ERRORLOG size threshold 500 Maximum size (in MB) of ERRORLOG file before a warning or an alarm is returned by the Alert.
ERRORLOG directory size threshold 10000 The maximum total size (in MB) of all files in the errorlog-file directory.
ERRORLOG file path Path where the ERRORLOG file is located.
enable xp_cmdshell NO If set to “YES“ the Alert will enable xp_cmdshell Instance configuration parameter to be able to run operation system commands to find out the size of files and directories.
file count threshold 500 The maximum number of files in the errorlog catalog.

Job Summary

error_log_dir_file_size_proc

Job Details

Description

This SQL Server monitoring job employs a series of procedures to track the changes and sizes of the ERRORLOG and its directory:

Configuration Parameters

Dependencies

The job relies on various objects including tables and stored procedures to manage and log the error log sizes:

dbWatch Report Configuration

Reports generated by this job offer insights into the error log health:

Version and Deployment Information

This monitoring job is essential for database administrators who require up-to-date insights into their SQL Server logs’ behavior and size to maintain optimal database performance and ensure quick accessibility and manageability of database logs.