Alerts
UID:
alertsVersion: 1.3.3 Panels: ~10 Datasource: MSSQL
Purpose
This dashboard centralizes the critical alerts of the Coyote monitoring system, providing:
- System uptime monitoring
- Disk space status
- User connections
- Transaction log size
- SQL services status
- Block indicators
Configured Alerts
System Up Time
System Up Time timeseries
System uptime has dropped below 24 hours.
Alert condition: The system may have experienced a restart, scheduled maintenance, or an unexpected outage.
Importance: An unexpected restart may indicate hardware problems, uncontrolled automatic updates, critical operating system errors, or power failures. If not investigated, recurring restarts may occur affecting service availability, loss of in-flight transactions, and data corruption if the shutdown was not clean.
Response Runbook
Diagnosis:
- Review Windows Event Viewer under System > search for events with ID 1074 (planned shutdown) or 6008 (unexpected shutdown)
- Check SQL Server logs for errors prior to restart
- Verify if there was a pending Windows Update
- Review hardware: temperature, voltage, disks (SMART status)
Remediation:
- If it was planned maintenance: document and close alert
- If it was unexpected: review memory dumps in C:\Windows\Minidump
- Verify database integrity with DBCC CHECKDB
- Confirm all SQL services are running
- Validate that SQL Agent jobs resumed correctly
Escalation:
- Do not escalate: If it was documented planned maintenance
- Escalate to Level 2: If the restart was unexpected and there is no clear cause in logs
- Escalate to Level 3/Infrastructure: If there are signs of hardware failure or recurring restarts (more than 2 in a week)
Recommended actions:
- Verify the cause of the restart
- Review Windows event logs
- Confirm all services are functioning
Disk Free Space
Disk Free Space bargauge
Free disk space has dropped below 20%.
Alert condition: Available space may indicate accelerated growth, inefficient usage, or unexpected data accumulation.
Importance: Insufficient disk space is one of the most common causes of unplanned SQL Server outages. Without available space, databases cannot grow, transaction logs fill up causing transactions to fail, and backups cannot complete. In extreme cases, SQL Server may stop completely, causing loss of service for all dependent applications.
Thresholds:
| Free Space | Color | Status |
|---|---|---|
| < 10% | Red | Critical |
| 10% - 20% | Orange | Warning |
| > 20% | Green | Normal |
Response Runbook
Diagnosis:
- Identify which disk is affected using the
[Maintenance].[vwDisksFreeSpace]view - Analyze what is consuming space: data, logs, backups, tempdb
- Review growth trend over the last 30 days
- Check if there are old backup files that haven't been purged
Immediate remediation (< 10%):
- Free up space by deleting old backups (maintain minimum required retention)
- Truncate transaction logs if there are recent log backups
- Empty system temporary folders
- Move backup files to secondary storage
Planned remediation (10-20%):
- Implement backup retention policies
- Configure automatic log shrink (with caution)
- Evaluate storage capacity expansion
- Review duplicate or unused indexes consuming space
Escalation:
- Do not escalate: If space > 15% and there is a cleanup plan in progress
- Escalate to Level 2: If space < 15% and cleanup does not free enough space
- Escalate to Infrastructure/Storage: If space < 10% and urgent storage expansion is required
- Escalate to Management: If growth indicates need for infrastructure investment
Recommended actions:
- Review disk usage
- Clean up unnecessary files
- Extend capacity if needed
- Verify log growth
User Connections
User Connections timeseries
Active connections have exceeded 25,000.
Alert condition: Excess connections may indicate:
- Unusually high application activity
- Connection pooling problems
- Runaway process
Importance: SQL Server has a maximum limit of 32,767 connections. Reaching this limit prevents new users or applications from connecting, causing immediate errors in applications. Additionally, an excessive number of connections consumes server memory (each connection uses approximately 1-2 MB), can degrade overall performance, and makes system resource management difficult.
Thresholds:
| Connections | Status |
|---|---|
| < 25,000 | Normal |
| >= 25,000 | Critical (SQL limit: 32,767) |
Response Runbook
Diagnosis:
- Identify applications with the most connections using
sys.dm_exec_sessionsgrouped byprogram_nameandhost_name - Check if there are orphaned connections or those in prolonged sleeping state
- Verify connection pooling configuration in .NET applications (Min/Max Pool Size)
- Analyze if there are batch processes running that open multiple connections
Remediation:
- Contact development teams of applications with the most connections
- Close inactive connections longer than X minutes using
KILL(with caution) - Review and adjust connection pooling configuration:
- Reduce
Max Pool Sizein connection strings - Enable
Connection Lifetimeto recycle connections
- Reduce
- Implement retry logic with exponential backoff in applications
- Consider Resource Governor to limit connections per workload group
Escalation:
- Do not escalate: If connections are between 20,000-25,000 and stable
- Escalate to Development: If a specific application is identified as causing the problem
- Escalate to Level 2: If connections exceed 28,000 and continue growing
- Escalate to Management: If third-party (vendor) intervention is required to adjust applications
Recommended actions:
- Review workload patterns
- Verify connection pooling
- Identify applications with many connections
Used Log Size
Used Log Size timeseries
Transaction log size has exceeded 80 GB.
Alert condition: May occur due to:
- Long-running transactions
- Insufficient log backups
- High-logging operations
Importance: An excessively large transaction log can fill the disk, causing the database to stop accepting transactions (error 9002). This completely stops write operations on the database. Additionally, log backups will take longer, restores will be slower, and if the log continues growing uncontrolled, it may indicate a more serious problem such as an orphaned transaction or broken replication.
Threshold:
| Log Size | Color | Status |
|---|---|---|
| < 80 GB | Green | Normal |
| >= 80 GB | Red | Critical |
Response Runbook
Diagnosis:
- Identify which database has the large log using
sys.master_files - Verify the recovery model (FULL requires frequent log backups)
- Look for long-running active transactions with
DBCC OPENTRAN - Check if there is replication, mirroring, or AlwaysOn with delays
- Check the
log_reuse_wait_descstatus insys.databases
Remediation:
- If
log_reuse_wait_desc= 'LOG_BACKUP': execute log backup immediately - If
log_reuse_wait_desc= 'ACTIVE_TRANSACTION': identify and resolve the blocking transaction - If
log_reuse_wait_desc= 'REPLICATION': verify Log Reader Agent status - After freeing space, consider log shrink (only if necessary)
- Adjust log backup frequency (every 15-30 minutes for active databases)
Escalation:
- Do not escalate: If log backup resolves the issue and the log shrinks
- Escalate to Level 2: If the log continues growing after backup or there is a blocking transaction that cannot be resolved
- Escalate to Senior DBA: If related to replication or AlwaysOn
- Escalate to Infrastructure: If the disk is at risk of filling before resolution
Recommended actions:
- Validate log backup jobs
- Monitor active transactions
- Ensure appropriate log maintenance
SQL Alerts Global
SQL Alerts Global table
Summary table of SQL alert status.
Indicators:
| Indicator | OK | KO |
|---|---|---|
| Blocked | 0 | >= 1 |
| Long_Blocked | 0 | >= 1 |
| SQL Agent Status | 0 | >= 1 |
| SQL Mail Status | 0 | >= 1 |
Blocked / Long_Blocked
Importance: Blocks in SQL Server can cause application timeouts, performance degradation, and in severe cases, deadlocks that abort transactions. Prolonged blocks (Long_Blocked) are especially critical because they affect multiple users and may indicate application design issues or missing indexes.
Response Runbook - Blocks
Diagnosis:
- Identify the blocking chain using
sys.dm_exec_requestsandsys.dm_os_waiting_tasks - Get the blocking process query with
sys.dm_exec_sql_text - Check if the block is due to lock escalation or specific page/row
Remediation:
- If it's a forgotten transaction: contact the user/application to commit or rollback
- If it's a batch process: consider running it during low-usage hours
- Implement
READ_COMMITTED_SNAPSHOTto reduce read blocks - Review indexes to reduce lock escalation
- As a last resort:
KILLthe blocking process (coordinating with the business)
Escalation for Blocks:
- Do not escalate: Minor blocks under 30 seconds that resolve themselves
- Escalate to Level 2: Blocks longer than 5 minutes or affecting multiple users
- Escalate to Development: If the block is caused by poor application code
- Escalate to Management: If a critical business process needs to be killed
SQL Agent Status
Importance: SQL Server Agent is responsible for running scheduled jobs including backups, index maintenance, and ETL processes. If the service is stopped, no jobs will run, which can result in missing backups (RPO non-compliance), outdated data in reports, and accumulation of maintenance tasks.
Response Runbook - SQL Agent
Diagnosis:
- Check the service status in Windows Services
- Review Windows Event Log for service errors
- Check the SQL Server Agent Error Log
- Verify that the service account has valid permissions
Remediation:
- Try restarting the SQL Server Agent service
- If startup fails, review logs to identify the cause
- Verify that the service account is not locked or password expired
- Check connectivity to the msdb database
- If it persists, restart SQL Server as a last resort (coordinating the impact)
Escalation for SQL Agent:
- Do not escalate: If restarting the service resolves the issue
- Escalate to Level 2: If the service does not start after restart
- Escalate to Infrastructure: If there are service account or permission issues
- Escalate to Management: If SQL Server restart is required during production hours
SQL Mail Status
Importance: Database Mail is the mechanism for sending alert notifications, scheduled reports, and job confirmations. If it's failing, the operations team will not receive critical alerts, which can result in undetected problems and SLA violations.
Response Runbook - SQL Mail
Diagnosis:
- Check Database Mail status with
sysmail_help_status_sp - Review the failed mail queue in
sysmail_faileditems - Check SMTP configuration in
sysmail_help_account_sp - Verify network connectivity to the SMTP server
Remediation:
- Restart Database Mail:
EXEC msdb.dbo.sysmail_stop_sp; EXEC msdb.dbo.sysmail_start_sp; - Verify that the SMTP server accepts connections from SQL Server
- Check for SMTP credential changes
- Review sending limits (some SMTP servers have rate limiting)
- Resend failed emails from the queue if necessary
Escalation for SQL Mail:
- Do not escalate: If restarting Database Mail resolves the issue
- Escalate to Infrastructure/Networks: If there are SMTP connectivity issues
- Escalate to Level 2: If there are configuration or credential issues
Alert Color Codes
| Color | Code | Meaning |
|---|---|---|
| Green | #00db88 / #6be38d | OK - Normal status |
| Orange | #ff780a | Warning - Warning |
| Magenta | #ad21d8e8 | KO - Requires attention |
| Red | #E02F44 | Critical - Immediate action |
Alert Response Guide
High Priority
| Alert | Immediate Action |
|---|---|
| Disk < 10% | Free space urgently |
| Log > 80 GB | Execute log backup |
| User Connections > 25000 | Investigate applications |
Medium Priority
| Alert | Planned Action |
|---|---|
| Disk 10-20% | Plan cleanup |
| Uptime < 24h | Investigate restart cause |
| SQL Agent KO | Restart service |
Alert Configuration Best Practices
Avoiding Alert Fatigue
"Alert fatigue" occurs when the team receives so many notifications that they begin to ignore them, including critical ones. To avoid this:
Classify alerts by severity: Not all alerts should notify the same way
- Critical: Immediate notification (SMS, call, Teams)
- Warning: Email with review within 4 hours
- Informational: Dashboard only, no active notification
Configure progressive thresholds: Escalate urgency based on severity
- Disk 20%: Dashboard warning
- Disk 15%: Email to team
- Disk 10%: Teams notification + automatic ticket
- Disk 5%: Call to on-call
Group related alerts: A disk failure can generate multiple alerts (disk, log, backup). Configure suppression of secondary alerts.
Review and adjust thresholds regularly: What was critical for a small server may be normal for a larger one.
Recommended Thresholds
| Metric | Warning | Critical | Notes |
|---|---|---|---|
| Free disk | < 20% | < 10% | Adjust based on total size |
| Transaction log | > 50 GB | > 80 GB | Depends on transaction volume |
| Connections | > 20,000 | > 25,000 | Consider normal baseline |
| Blocks | > 30 sec | > 5 min | Long_Blocked is always critical |
| SQL CPU | > 80% (5 min) | > 95% (5 min) | Sustained, not spikes |
| PLE | < 300 sec | < 100 sec | Depends on total memory |
Documentation and Runbooks
- Keep runbooks updated: Each alert should have clear diagnosis and remediation steps
- Record actions taken: Document what was done to resolve each alert
- Incident post-mortem: After major incidents, review if alerts were effective
- Train the team: Ensure everyone knows the runbooks and when to escalate
Schedules and On-Call
- Define notification schedules: Some warning alerts can wait until business hours
- On-call rotation: Distribute the load to avoid burnout
- Automatic escalation: If a critical alert is not acknowledged in X minutes, escalate automatically
Views Used
| View | Description |
|---|---|
[Maintenance].[vwDisksFreeSpace] | Free disk space |
[Alert].[vwSQLAlertsGlobal] | Global SQL alert status |
Performance Counters Tables
| Counter | Description |
|---|---|
Seconds Since Start | Time since system start |
User Connections | Active connections |
Log File(s) Used Size (KB) | Used log size |
Notification Configuration
Grafana alerts can be configured to send notifications through:
- Email: Direct delivery to administrators
- Teams/Slack: Notification channels
- Webhook: Integration with external systems
Microsoft References
Official Monitoring Documentation
- Monitor and Tune for Performance (SQL Server) - Complete performance monitoring guide
- SQL Server Performance Counters - Performance counters reference
- Dynamic Management Views (DMVs) - Dynamic management views for diagnostics
Space and Log Management
- Manage the Size of the Transaction Log File - Transaction log management
- Troubleshoot a Full Transaction Log (Error 9002) - Full log troubleshooting
- Database File Initialization - Database file initialization
Blocks and Performance
- Understand and Resolve SQL Server Blocking Problems - Blocking resolution
- Monitoring Resource Usage (System Monitor) - Resource monitoring
- Lock Modes - Locks and row versioning guide
SQL Server Agent
- SQL Server Agent - SQL Server Agent documentation
- Automate Administration Tasks (SQL Server Agent) - Administrative task automation
- SQL Server Agent Error Log - Agent error log
Database Mail
- Database Mail - Database Mail documentation
- Configure Database Mail - Database Mail configuration
- Check the Status of E-Mail Messages Sent With Database Mail - Check email status
Best Practices
- SQL Server Best Practices - Performance best practices
- Backup and Restore Strategy - Backup and restore strategy
