Skip to content

Commit e1b6f47

Browse files
added severity
1 parent 9c2478b commit e1b6f47

File tree

6 files changed

+62
-0
lines changed

6 files changed

+62
-0
lines changed

src/sonic-yang-models/yang-events/sonic-events-bgp.yang

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ module sonic-events-bgp {
77
prefix evtcmn;
88
}
99

10+
import openconfig-alarm-types {
11+
prefix oc-alarm-types;
12+
}
13+
1014
revision 2022-12-01 {
1115
description "BGP alert events.";
1216
}
@@ -21,6 +25,8 @@ module sonic-events-bgp {
2125
"SONIC BGP events";
2226

2327
container bgp-state {
28+
oc-alarm-types:MAJOR
29+
2430
description "
2531
Declares an event for BGP state for a neighbor IP
2632
The status says up or down";
@@ -42,6 +48,8 @@ module sonic-events-bgp {
4248
}
4349

4450
container bgp-hold-timer {
51+
oc-alarm-types:MAJOR
52+
4553
description "
4654
Declares an event for BGP hold timer expiry.
4755
This event does not have any other parameter.
@@ -51,6 +59,8 @@ module sonic-events-bgp {
5159
}
5260

5361
container zebra-no-buff {
62+
oc-alarm-types:MAJOR
63+
5464
description "
5565
Declares an event for zebra running out of buffer.
5666
This event does not have any other parameter.

src/sonic-yang-models/yang-events/sonic-events-dhcp_relay.yang

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ module sonic-events-dhcp-relay {
22
namespace "http://github.com/sonic-net/sonic-events-dhcp-relay";
33
yang-version 1.1;
44

5+
import openconfig-alarm-types {
6+
prefix oc-alarm-types;
7+
}
8+
59
import sonic-events-common {
610
prefix evtcmn;
711
}
@@ -20,6 +24,8 @@ module sonic-events-dhcp-relay {
2024
"SONIC dhcp-relay events";
2125

2226
container dhcp-relay-discard {
27+
oc-alarm-types:MAJOR
28+
2329
description "
2430
Declares an event for dhcp-relay discarding packet on an
2531
interface due to missing IP address assigned.
@@ -44,6 +50,8 @@ module sonic-events-dhcp-relay {
4450
}
4551

4652
container dhcp-relay-disparity {
53+
oc-alarm-types:MAJOR
54+
4755
description "
4856
Declares an event for disparity detected in
4957
DHCP Relay behavior by dhcpmon.

src/sonic-yang-models/yang-events/sonic-events-host.yang

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ module events-host {
22
namespace "http://github.com/sonic-net/sonic-events-host";
33
yang-version 1.1;
44

5+
import openconfig-alarm-types {
6+
prefix oc-alarm-types;
7+
}
8+
59
import sonic-events-common {
610
prefix evtcmn;
711
}
@@ -10,6 +14,8 @@ module events-host {
1014
}
1115

1216
container disk-usage {
17+
oc-alarm-types:MINOR
18+
1319
description "
1420
Declares an event for disk usage crossing set limit
1521
The parameters describe the usage & limit set.";
@@ -26,6 +32,8 @@ module events-host {
2632
}
2733

2834
container memory-usage {
35+
oc-alarm-types:MINOR
36+
2937
description "
3038
Declares an event for memory usage crossing set limit
3139
The parameters describe the usage & limit set.";
@@ -36,6 +44,8 @@ module events-host {
3644
}
3745

3846
container event-sshd {
47+
oc-alarm-types:MINOR
48+
3949
description "
4050
Declares an event reported by sshd.
4151
The fail type declares the type of failure.
@@ -53,6 +63,8 @@ module events-host {
5363
}
5464

5565
container event-disk {
66+
oc-alarm-types:MINOR
67+
5668
description "
5769
Declares an event reported by disk check.
5870
The fail type declares the type of failure.
@@ -69,6 +81,8 @@ module events-host {
6981
}
7082

7183
container event-kernel {
84+
oc-alarm-types:MINOR
85+
7286
description "
7387
Declares an event reported by kernel.
7488
The fail type declares the type of failure.";
@@ -95,6 +109,8 @@ module events-host {
95109
}
96110

97111
container event-monit-proc {
112+
evtcmn:severity "2"
113+
98114
description "
99115
Declares an event reported by monit for a process
100116
that is not running.
@@ -119,6 +135,8 @@ module events-host {
119135
}
120136

121137
container event-monit-status {
138+
evtcmn:severity "2"
139+
122140
description "
123141
Declares an event reported by monit for status check
124142
failure for a process
@@ -149,6 +167,8 @@ module events-host {
149167
}
150168

151169
container event-platform {
170+
evtcmn:severity "2"
171+
152172
description "
153173
Declares an event for platform related failure.
154174
Params:

src/sonic-yang-models/yang-events/sonic-events-pmon.yang

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ module sonic-events-pmon {
22
namespace "http://github.com/sonic-net/sonic-events-pmon";
33
yang-version 1.1;
44

5+
import openconfig-alarm-types {
6+
prefix oc-alarm-types;
7+
}
8+
59
import sonic-events-common {
610
prefix evtcmn;
711
}
@@ -21,6 +25,8 @@ module sonic-events-pmon {
2125

2226

2327
container pmon-exited {
28+
oc-alarm-types:MAJOR
29+
2430
description "
2531
Declares an event reportes by pmon for an unexpected exit.
2632
The exited entity is the only param";

src/sonic-yang-models/yang-events/sonic-events-swss.yang

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ module sonic-events-swss {
22
namespace "http://github.com/sonic-net/sonic-events-swss";
33
yang-version 1.1;
44

5+
import openconfig-alarm-types {
6+
prefix oc-alarm-types;
7+
}
8+
59
import sonic-events-common {
610
prefix evtcmn;
711
}
@@ -20,6 +24,8 @@ module sonic-events-swss {
2024
"SONIC SWSS events";
2125

2226
container redis-generic {
27+
oc-alarm-types:MAJOR
28+
2329
description "
2430
Declares an event for a fatal error encountered by swss.
2531
The asic-index of the failing process is the only param.";
@@ -34,6 +40,8 @@ module sonic-events-swss {
3440
}
3541

3642
container if-state {
43+
oc-alarm-types:MINOR
44+
3745
description "
3846
Declares an event for i/f flap.
3947
@@ -57,6 +65,8 @@ module sonic-events-swss {
5765
}
5866

5967
container pfc-storm {
68+
oc-alarm-types:MAJOR
69+
6070
description "
6171
Declares an event for PFC storm.
6272
@@ -86,6 +96,8 @@ module sonic-events-swss {
8696
}
8797

8898
container chk_crm_threshold {
99+
oc-alarm-types:MAJOR
100+
89101
description "
90102
Declares an event for CRM threshold.";
91103

src/sonic-yang-models/yang-events/sonic-events-syncd.yang

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ module sonic-events-syncd {
22
namespace "http://github.com/sonic-net/sonic-events-syncd";
33
yang-version 1.1;
44

5+
import openconfig-alarm-types {
6+
prefix oc-alarm-types;
7+
}
8+
59
import sonic-events-common {
610
prefix evtcmn;
711
}
@@ -20,6 +24,8 @@ module sonic-events-syncd {
2024
"SONIC syncd events";
2125

2226
container syncd_failure {
27+
oc-alarm-types:MAJOR
28+
2329
description "
2430
Declares an event for all types of syncd failure.
2531
The type of failure and the asic-index of failing syncd are

0 commit comments

Comments
 (0)