3.13 ErrorLog

Use this Knowledge Script to monitor the SQL Server error logs (Errorlog, Errorlog.* in the SQL Server log folder). Ensure that the user has read permission to this files/folders.

On the first job iteration, this script sets a starting point for next iteration log scanning and does not scan the existing entries in the logs. As a result, it does not return any results on the first iteration. As it continues to run at the interval specified in the Schedule tab, this script looks for any error log entries that have appeared since the last monitoring interval.

This script looks for the matching log text you specified in the Log text to match parameter. If you disable the Literal match? parameter, log text containing any of the words you specified is considered a match. This script raises an event if the number of entries that match the Log text to match criteria exceeds the threshold you specify.

Resource Objects

SQL Server instance

Default Schedule

The default interval for this script is Once every hour.

Setting Parameter Values

Set the following parameters as needed:

Description

How to Set It

General Settings

Job Failure Notification

Raise event if job fails unexpectedly?

Select Yes to raise an event if the SQLServer_ErrorLog job fails unexpectedly. The default is Yes.

Event severity when job fails unexpectedly

Set the event severity level, from 1 to 40, to indicate the importance of an event that is raised when the job fails unexpectedly. The default is 5.

Additional Settings

 

Event Details

 

Event detail format

Select the format in which you want to display the event detail. You can select from HTML Table or Plain Text. The default is HTML Table.

Monitor Error Log

Log text to match

Specify all or part of the string you want to check for. Separate multiple search strings with commas.

The default is Wait-for graph.

NOTE:The text string Wait-for graph can be used to catch deadlocks that might occur on the SQL Server instance you are monitoring. However, if this string is used, the SQL Server instance must have additional tracing enabled. For more information, see Microsoft Knowledge Base article 832524.

Literal match?

Select Yes if you want to search for the entire search string. For example, if you set this parameter to Yes and specify “foo bar” as the search string, only lines containing “foo bar” are considered a match. The default is Yes.

Select No to match any of the words in the Log text to match parameter value. For example, if you set this parameter to No and specify “foo bar” as the search string, any lines that contain “foo,” “bar,” or “foo bar” are considered a match.

Case-sensitive?

Select Yes to match upper and lower case letters when checking for a match to the search string. The default is No.

Text to exclude

Specify a string or series of strings that you want to exclude from the search results. Use comma to separate multiple strings.

Event Notification

Raise event if number of new log entries exceed threshold?

Select Yes to raise an event if new log entries are found. The default is Yes.

NOTE:In general, the detail message for the Knowledge Script contains details about the occurrences found. If the message is larger than 32 KB, the data is saved in a file on the managed computer in the \NetIQ\AppManager\bin folder, and the detail message contains the truncated data. If you generate these log files, you should periodically remove the files when you are done with them.

Event severity when number of new log entries exceed threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the number of new log entries exceed the threshold. The default is 5.

Threshold -- Maximum number of new log entries

Specify the number of entries that can be logged before an event is raised. The default is 0.

Data Collection

Collect data for number of new log entries?

Select Yes to collect data for the new log entries for charts and reports. If enabled, data collection returns the number of new event log entries.The default is unselected.