Skip to content

Commit d1bf9f2

Browse files
committed
csp-mixin(gcp compute engine): Add alert for CPU
1 parent 7a817b8 commit d1bf9f2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

csp-mixin/alerts.libsonnet

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,26 @@
4545
dashboard_uid: '58f33c50e66c911b0ad8a25aa438a96e',
4646
},
4747
},
48+
{
49+
alert: 'GcpCEHighCpuUtilization',
50+
expr: 'avg by (%s) (%s) > 85' %
51+
[
52+
std.join(',', this.config.groupLabels + this.config.instanceLabels),
53+
this.signals.gcpceOverview.tableCpuUtilization.asRuleExpression(),
54+
],
55+
'for': '5m',
56+
keep_firing_for: '10m',
57+
labels: {
58+
severity: 'critical',
59+
service: 'Compute Engine',
60+
namespace: 'cloud-provider-' + this.config.uid,
61+
},
62+
annotations: {
63+
summary: 'CPU utilization is too high',
64+
description: 'The VM {{$labels.resourceName}} is under heavy load and may become unresponsive.',
65+
dashboard_uid: 'f115fe73641347c43415535d77e2dc0f',
66+
},
67+
},
4868
],
4969
},
5070
],

0 commit comments

Comments
 (0)