Skip to content

Commit 24c3d0b

Browse files
committed
Add FibreChannel alerts
1 parent 2c3a116 commit 24c3d0b

File tree

1 file changed

+163
-0
lines changed

1 file changed

+163
-0
lines changed

snmp-observ-lib/alerts.libsonnet

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,152 @@ local xtd = import 'github.com/jsonnet-libs/xtd/main.libsonnet';
55
local instanceLabel = xtd.array.slice(this.config.instanceLabels, -1)[0],
66
local groupLabel = xtd.array.slice(this.config.groupLabels, -1)[0],
77
groups+: [
8+
{
9+
name: this.config.uid + '-fc-snmp-alerts',
10+
rules:
11+
[
12+
{
13+
alert: 'SNMPInterfaceFCerrors',
14+
expr: |||
15+
(%s) > 0
16+
|||
17+
% [
18+
this.signals.fiber.fcIfTxWaitCount.asRuleExpression(),
19+
],
20+
labels: {
21+
severity: 'warning',
22+
},
23+
annotations: {
24+
summary: 'Too many packets with errors (fcIfTxWaitCount) on the FC network interface.',
25+
description: |||
26+
Too many packets with errors (fcIfTxWaitCount) on {{ $labels.%s }}, FC interface {{ $labels.ifName }} ({{$labels.ifAlias}}) for extended period of time (15m).
27+
||| % [instanceLabel],
28+
},
29+
'for': '15m',
30+
keep_firing_for: '3m',
31+
},
32+
{
33+
alert: 'SNMPInterfaceFCerrors',
34+
expr: |||
35+
(%s) > 0
36+
|||
37+
% [
38+
this.signals.fiber.fcIfFramesDiscard.asRuleExpression(),
39+
],
40+
labels: {
41+
severity: 'warning',
42+
},
43+
annotations: {
44+
summary: 'Too many packets with errors (fcIfFramesDiscard) on the FC network interface.',
45+
description: |||
46+
Too many packets with errors (fcIfFramesDiscard) on {{ $labels.%s }}, FC interface {{ $labels.ifName }} ({{$labels.ifAlias}}) for extended period of time (15m).
47+
||| % [instanceLabel],
48+
},
49+
'for': '15m',
50+
keep_firing_for: '3m',
51+
},
52+
{
53+
alert: 'SNMPInterfaceFCerrors',
54+
expr: |||
55+
(%s) > 0
56+
|||
57+
% [
58+
this.signals.fiber.fcIfTxWtAvgBBCreditTransitionToZero.asRuleExpression(),
59+
],
60+
labels: {
61+
severity: 'warning',
62+
},
63+
annotations: {
64+
summary: 'Too many packets with errors (fcIfTxWtAvgBBCreditTransitionToZero) on the FC network interface.',
65+
description: |||
66+
Too many packets with errors (fcIfTxWtAvgBBCreditTransitionToZero) on {{ $labels.%s }}, FC interface {{ $labels.ifName }} ({{$labels.ifAlias}}) for extended period of time (15m).
67+
||| % [instanceLabel],
68+
},
69+
'for': '15m',
70+
keep_firing_for: '3m',
71+
},
72+
{
73+
alert: 'SNMPInterfaceFCerrors',
74+
expr: |||
75+
(%s) > 0
76+
|||
77+
% [
78+
this.signals.fiber.fcHCIfBBCreditTransistionFromZero.asRuleExpression(),
79+
],
80+
labels: {
81+
severity: 'warning',
82+
},
83+
annotations: {
84+
summary: 'Too many packets with errors (fcHCIfBBCreditTransistionFromZero) on the FC network interface.',
85+
description: |||
86+
Too many packets with errors (fcHCIfBBCreditTransistionFromZero) on {{ $labels.%s }}, FC interface {{ $labels.ifName }} ({{$labels.ifAlias}}) for extended period of time (15m).
87+
||| % [instanceLabel],
88+
},
89+
'for': '15m',
90+
keep_firing_for: '3m',
91+
},
92+
{
93+
alert: 'SNMPInterfaceFCerrors',
94+
expr: |||
95+
(%s) > 0
96+
|||
97+
% [
98+
this.signals.fiber.fcHCIfBBCreditTransistionToZero.asRuleExpression(),
99+
],
100+
labels: {
101+
severity: 'warning',
102+
},
103+
annotations: {
104+
summary: 'Too many packets with errors (fcHCIfBBCreditTransistionToZero) on the FC network interface.',
105+
description: |||
106+
Too many packets with errors (fcHCIfBBCreditTransistionToZero) on {{ $labels.%s }}, FC interface {{ $labels.ifName }} ({{$labels.ifAlias}}) for extended period of time (15m).
107+
||| % [instanceLabel],
108+
},
109+
'for': '15m',
110+
keep_firing_for: '3m',
111+
},
112+
{
113+
alert: 'SNMPInterfaceFCerrors',
114+
expr: |||
115+
(%s) > 0
116+
|||
117+
% [
118+
this.signals.fiber.fcIfInvalidCrcs.asRuleExpression(),
119+
],
120+
labels: {
121+
severity: 'warning',
122+
},
123+
annotations: {
124+
summary: 'Too many packets with errors (fcIfInvalidCrcs) on the FC network interface.',
125+
description: |||
126+
Too many packets with errors (fcIfInvalidCrcs) on {{ $labels.%s }}, FC interface {{ $labels.ifName }} ({{$labels.ifAlias}}) for extended period of time (15m).
127+
||| % [instanceLabel],
128+
},
129+
'for': '15m',
130+
keep_firing_for: '3m',
131+
},
132+
{
133+
alert: 'SNMPInterfaceFCerrors',
134+
expr: |||
135+
(%s) > 0
136+
|||
137+
% [
138+
this.signals.fiber.fcIfInvalidTxWords.asRuleExpression(),
139+
],
140+
labels: {
141+
severity: 'warning',
142+
},
143+
annotations: {
144+
summary: 'Too many packets with errors (fcIfInvalidTxWords) on the FC network interface.',
145+
description: |||
146+
Too many packets with errors (fcIfInvalidTxWords) on {{ $labels.%s }}, FC interface {{ $labels.ifName }} ({{$labels.ifAlias}}) for extended period of time (15m).
147+
||| % [instanceLabel],
148+
},
149+
'for': '15m',
150+
keep_firing_for: '3m',
151+
},
152+
],
153+
},
8154
{
9155
name: this.config.uid + '-snmp-alerts',
10156
rules:
@@ -26,6 +172,22 @@ local xtd = import 'github.com/jsonnet-libs/xtd/main.libsonnet';
26172
% this.config { instanceLabel: instanceLabel },
27173
},
28174
},
175+
{
176+
alert: 'SNMPFRUComponentProblem',
177+
expr: |||
178+
(%s) == 1
179+
||| % [
180+
this.signals.system.fruOperStatus.withFilteringSelectorMixin('cefcFRUPowerOperStatus!="on"').asRuleExpression(),
181+
],
182+
labels: {
183+
severity: 'warning',
184+
},
185+
annotations: {
186+
summary: 'SNMP FRU component is not on.',
187+
description: 'SNMP field replaceable unit is in {{ $labels.cefcFRUPowerOperStatus }} status on {{ $labels.%(instanceLabel)s }}.'
188+
% this.config { instanceLabel: instanceLabel },
189+
},
190+
},
29191
{
30192
alert: 'SNMPNodeCPUHighUsage',
31193
expr: |||
@@ -215,6 +377,7 @@ local xtd = import 'github.com/jsonnet-libs/xtd/main.libsonnet';
215377
else []
216378
),
217379
},
380+
218381
],
219382
},
220383
}

0 commit comments

Comments
 (0)