Skip to content

Commit 5cd2279

Browse files
authored
Add dashboard_url to Azure SQL database alerts (#1416)
* Add dashboard_url to Azure SQL database alerts * add missing serviceId * fix lint * fix lint - update prometheus_alerts.yaml * fix lint - update prometheus_alerts.yaml
1 parent 6f0a4d4 commit 5cd2279

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

csp-mixin/alerts/azure-alerts.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ groups:
3939
labels:
4040
severity: critical
4141
service: 'Azure SQL database'
42+
serviceId: 'microsoft.sql/servers/databases'
4243
namespace: cloud-provider-azure
4344
annotations:
4445
summary: 'High database DTU consumption.'
4546
description: 'Check active queries and optimize indexes or consider scaling up DTUs to handle load in {{ $labels.resourceName }} database.'
46-
dashboard_uid: '82c5b6cf30db5b601c5cc3f5d8d4284d'
47+
dashboard_url: '/a/grafana-csp-app/azure/dashboards/sqldatabase'
4748

4849
- alert: AzureDatabaseHighStorageUsage
4950
expr: |
@@ -58,7 +59,7 @@ groups:
5859
annotations:
5960
summary: 'High database Storage usage.'
6061
description: 'Archive or delete old data, or scale up storage capacity in {{ $labels.resourceName }} database.'
61-
dashboard_uid: '82c5b6cf30db5b601c5cc3f5d8d4284d'
62+
dashboard_url: '/a/grafana-csp-app/azure/dashboards/sqldatabase'
6263

6364
- alert: AzureDatabaseHighDeadlockCount
6465
expr: |
@@ -73,7 +74,7 @@ groups:
7374
annotations:
7475
summary: 'High database Deadlock count.'
7576
description: 'Check {{ $labels.resourceName }} database logs for deadlock details and optimize affected queries.'
76-
dashboard_uid: '82c5b6cf30db5b601c5cc3f5d8d4284d'
77+
dashboard_url: '/a/grafana-csp-app/azure/dashboards/sqldatabase'
7778

7879
- alert: AzureDatabaseHighUserCpuUsage
7980
expr: |
@@ -88,7 +89,7 @@ groups:
8889
annotations:
8990
summary: 'High database User CPU usage.'
9091
description: 'Identify high CPU queries on {{ $labels.resourceName }} database and optimize them.'
91-
dashboard_uid: '82c5b6cf30db5b601c5cc3f5d8d4284d'
92+
dashboard_url: '/a/grafana-csp-app/azure/dashboards/sqldatabase'
9293

9394
- alert: AzureDatabaseHighSystemFailedConnections
9495
expr: |
@@ -103,7 +104,7 @@ groups:
103104
annotations:
104105
summary: 'High number of database System Failed connections.'
105106
description: 'Check network problems, firewall restrictions or high resource consumption affecting application access to the {{ $labels.resourceName }} database.'
106-
dashboard_uid: '82c5b6cf30db5b601c5cc3f5d8d4284d'
107+
dashboard_url: '/a/grafana-csp-app/azure/dashboards/sqldatabase'
107108

108109
- alert: AzureDatabaseHighUserFailedConnections
109110
expr: |
@@ -118,7 +119,7 @@ groups:
118119
annotations:
119120
summary: 'High number of database User Failed connections.'
120121
description: 'Check for authentication problems, network configuration errors, firewall issues, or resource constraints, affecting database accessibility for users on database {{ $labels.resourceName }}.'
121-
dashboard_uid: '82c5b6cf30db5b601c5cc3f5d8d4284d'
122+
dashboard_url: '/a/grafana-csp-app/azure/dashboards/sqldatabase'
122123

123124
- alert: AzureDatabaseHighWorkerUsage
124125
expr: |
@@ -133,7 +134,7 @@ groups:
133134
annotations:
134135
summary: 'High database worker usage.'
135136
description: 'Look for long execution queries, review the number of concurrent queries and requests being sent to the database or check if there are any blocking sessions or deadlocks into the {{ $labels.resourceName }} database.'
136-
dashboard_uid: '82c5b6cf30db5b601c5cc3f5d8d4284d'
137+
dashboard_url: '/a/grafana-csp-app/azure/dashboards/sqldatabase'
137138

138139
- alert: AzureDatabaseHighDataIoUsage
139140
expr: |
@@ -148,7 +149,7 @@ groups:
148149
annotations:
149150
summary: 'High database data IO usage.'
150151
description: 'Review queries with high read or write activity, check if there are missing indexes or inefficient indexes that result in full table scans and assess the volume of transactions into the {{ $labels.resourceName }} database.'
151-
dashboard_uid: '82c5b6cf30db5b601c5cc3f5d8d4284d'
152+
dashboard_url: '/a/grafana-csp-app/azure/dashboards/sqldatabase'
152153

153154
- alert: AzureDatabaseLowTempdbLogSpace
154155
expr: |
@@ -163,4 +164,4 @@ groups:
163164
annotations:
164165
summary: 'Low database tempdb log space.'
165166
description: 'Look for active sessions that might be using TempDB intensively, identify stored procedures or queries that create temporary tables or objects, and also look for long-running or memory-intensive queries that rely heavily on TempDB into the {{ $labels.resourceName }} database.'
166-
dashboard_uid: '82c5b6cf30db5b601c5cc3f5d8d4284d'
167+
dashboard_url: '/a/grafana-csp-app/azure/dashboards/sqldatabase'

csp-mixin/alerts/gcp-alerts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ groups:
9393

9494
- alert: GcpCloudSQLAbortedConnections
9595
expr: |
96-
sum by(job, instance, project_id)(rate(stackdriver_cloudsql_database_cloudsql_googleapis_com_database_mysql_aborted_connects_count[5m])) > 5
96+
sum by(job, instance, project_id, database_id)(rate(stackdriver_cloudsql_database_cloudsql_googleapis_com_database_mysql_aborted_connects_count[5m])) > 5
9797
for: 5m
9898
keep_firing_for: 10m
9999
labels:

csp-mixin/prometheus_rules_out/prometheus_alerts.yaml

Lines changed: 11 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)