High activity monitor


Job details

Name: High activity monitor
Platform: Sqlserver
Category: Performance
Description: Collects SQL instance CPU usage, CPU usage of other processes, logical and physical reads, and active processes count on the SQL Server instance.
Long description: Collects SQL instance CPU usage, CPU usage of other processes, logical and physical reads, and active processes count on the SQL Server instance.
Collects SQL instance CPU usage, CPU usage of other processes, logical and physical reads, and active processes count on the SQL Server instance.
Version: 2
Default schedule: 0 * * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2005′ & hasengine=‘YES’ & (engine_edition = ‘Microsoft SQL Server’ engine_edition = ‘Azure SQL Managed Instance’)]

Parameters

Name Default value Description
history threshold 48 The number of hours the statistics are hold in the history table.
logical reads threshold 250000 Avg. logical reads per second. If this threshold is reached over a period of time (controlled by two parameters, “warning threshold” and “alarm threshold”), a warning/alarm is returned.
alarm threshold 60 A period of time (in minutes) which must be passed (combined with average values exceeding the threshold values) before an alarm is returned by the alert procedure.
SQL Server CPU threshold 85 Avg. CPU usage by SQL Server. If this threshold is reached over a period of time (controlled by two parameters, “warning threshold” and “alarm threshold”), a warning/alarm is returned.
other CPU threshold 60 Avg. CPU usage (excluding SQL Server). If this threshold is reached over a period of time (controlled by two parameters, “warning threshold” and “alarm threshold”), a warning/alarm is returned.
physical reads threshold 20000 Avg. physical reads per second. If this threshold is reached over a period of time (controlled by two parameters, “warning threshold” and “alarm threshold”), a warning/alarm is returned.
active processes threshold 25 Avg. active processes. If this threshold is reached over a period of time (controlled by parameter “period span”), a warning/alarm is returned.
warning threshold 15 A period of time (in minutes) which must be passed (combined with average values exceeding the threshold values) before a warning is returned by the alert procedure.
enable warnings and alarms NO If set to “NO” (default), the job will only collect performance statistics without returning status warning or alarm. Value “YES“ will activate the job.
graph time range 2 This parameter determines how many hours back from the current time the data should be visualized in the report graphs regardless of how many hours statistics are collected for.

Job Summary

SELECT * FROM high_act_mon_tab;
SELECT * FROM sys.dm_os_performance_counters WHERE counter_name = 'Batch Requests/sec';

Key Dependencies

Parameters Handled

The job involves several parameters to control the monitoring logic, such as:

Reporting and Visualization

Implementation Details

Upgrades and Maintenance

This monitoring job is vital for database administrators to ensure that the SQL Server instance runs efficiently without performative bottlenecks or resource constraints, using a meticulous reporting and alert system to manage the database health proactively.