Skip to content

Commit d38f04b

Browse files
authored
Update event-alarm-framework.md
1 parent c0be3f2 commit d38f04b

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

doc/event-alarm-framework/event-alarm-framework.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -508,15 +508,15 @@ send it to syslog.
508508
```
509509
An example of syslog message generated for an event raised when user selects a custom event profile.
510510
```
511-
May 19 21:22:07.122786 2021 sonic WARNING eventd#eventd[2419]: [EVENT], %CUSTOM_EVPROFILE_CHANGE :- handle_custom_evprofile: Custom Event Profile myprofile.json is applied.. Custom Event Profile is selected by user.
511+
May 19 21:22:07.122786 2021 sonic WARNING eventd#eventd[2419]: [EVENT], %CUSTOM_EVPROFILE_CHANGE : handle_custom_evprofile: Custom Event Profile myprofile.json is applied.. Custom Event Profile is selected by user.
512512
```
513513
Syslog message for an alarm raised by a sensor:
514514
```
515-
May 19 21:42:14.373410 2021 sonic ALERT eventd#eventd[2453]: [ALARM] (RAISE), %TEMPERATURE_EXCEEDED :- temperatureCrossedThreshold: Current temperature of sensor/2 is 76 degrees. Temperature threshold is 75 degrees.
515+
May 19 21:42:14.373410 2021 sonic ALERT eventd#eventd[2453]: [ALARM] (RAISE), %TEMPERATURE_EXCEEDED : temperatureCrossedThreshold: Current temperature of sensor/2 is 76 degrees. Temperature threshold is 75 degrees.
516516
```
517517
Syslog message when alarm is clared is as follows:
518518
```
519-
May 19 21:46:34.373693 2021 sonic ALERT eventd#eventd[2453]: [ALARM] (CLEAR), %TEMPERATURE_EXCEEDED :- temperatureCrossedThreshold: Current temperature of sensor/2 is 70 degrees. Temperature threshold is 75 degrees.
519+
May 19 21:46:34.373693 2021 sonic ALERT eventd#eventd[2453]: [ALARM] (CLEAR), %TEMPERATURE_EXCEEDED : temperatureCrossedThreshold: Current temperature of sensor/2 is 70 degrees. Temperature threshold is 75 degrees.
520520
```
521521
Syslog message when alarm with id=4 is acknowledged is as follows:
522522
```
@@ -705,7 +705,7 @@ severity : Severity of the event {string}
705705
706706
127.0.0.1:6379[6]> hgetall "EVENT|1"
707707
1) "text"
708-
2) ":- handle_custom_evprofile: Custom Event Profile x.json is applied."
708+
2) "handle_custom_evprofile: Custom Event Profile x.json is applied."
709709
3) "type-id"
710710
4) "CUSTOM_EVPROFILE_CHANGE"
711711
5) "id"
@@ -1045,13 +1045,13 @@ sonic# show event
10451045
----------------------------------------------------------------------------------------------------------------------------
10461046
Id Action Severity Name Timestamp Description
10471047
----------------------------------------------------------------------------------------------------------------------------
1048-
1 - WARNING CUSTOM_EVPROFILE_CHANGE 2021-05-19T21:38:27.455Z :- handle_custom_evprofile: Custom Event Profile x.json is applied.
1049-
2 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:39:31.622Z :- signalHandler: Raising simulated alarm
1050-
3 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:42:34.371Z :- signalHandler: Clearing simulated alarm
1051-
4 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:46:14.371Z :- signalHandler: Raising simulated alarm
1048+
1 - WARNING CUSTOM_EVPROFILE_CHANGE 2021-05-19T21:38:27.455Z handle_custom_evprofile: Custom Event Profile x.json is applied.
1049+
2 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:39:31.622Z signalHandler: Raising simulated alarm
1050+
3 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:42:34.371Z signalHandler: Clearing simulated alarm
1051+
4 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:46:14.371Z signalHandler: Raising simulated alarm
10521052
5 ACKNOWLEDGE CRITICAL DUMMY_ALARM 2021-05-19T21:48:05.845Z Alarm id 4 ACKNOWLEDGE.
10531053
6 UNACKNOWLEDGE CRITICAL DUMMY_ALARM 2021-05-19T21:53:24.484Z Alarm id 4 UNACKNOWLEDGE.
1054-
7 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:55:54.977Z :- signalHandler: Clearing simulated alarm
1054+
7 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:55:54.977Z signalHandler: Clearing simulated alarm
10551055
10561056
sonic# show event details
10571057
----------------------------------------------
@@ -1062,7 +1062,7 @@ Action: -
10621062
Severity: WARNING
10631063
Type: CUSTOM_EVPROFILE_CHANGE
10641064
Timestamp 2021-05-19T21:38:27.455Z
1065-
Description: :- handle_custom_evprofile: Custom Event Profile x.json is applied.
1065+
Description: handle_custom_evprofile: Custom Event Profile x.json is applied.
10661066
Source: /etc/evprofile/x.json
10671067
10681068
----------------------------------------------
@@ -1073,7 +1073,7 @@ Action: RAISE
10731073
Severity: CRITICAL
10741074
Type: DUMMY_ALARM
10751075
Timestamp 2021-05-19T21:39:31.622Z
1076-
Description: :- signalHandler: Raising simulated alarm
1076+
Description: signalHandler: Raising simulated alarm
10771077
Source: simulation
10781078
10791079
----------------------------------------------
@@ -1084,7 +1084,7 @@ Action: CLEAR
10841084
Severity: CRITICAL
10851085
Type: DUMMY_ALARM
10861086
Timestamp 2021-05-19T21:42:34.371Z
1087-
Description: :- signalHandler: Clearing simulated alarm
1087+
Description: signalHandler: Clearing simulated alarm
10881088
Source: simulation
10891089
10901090
sonic# show event summary
@@ -1100,23 +1100,23 @@ sonic# show event severity critical
11001100
----------------------------------------------------------------------------------------------------------------------------
11011101
Id Action Severity Name Timestamp Description
11021102
----------------------------------------------------------------------------------------------------------------------------
1103-
2 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:39:31.622Z :- signalHandler: Raising simulated alarm
1104-
3 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:42:34.371Z :- signalHandler: Clearing simulated alarm
1105-
4 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:46:14.371Z :- signalHandler: Raising simulated alarm
1103+
2 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:39:31.622Z signalHandler: Raising simulated alarm
1104+
3 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:42:34.371Z signalHandler: Clearing simulated alarm
1105+
4 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:46:14.371Z signalHandler: Raising simulated alarm
11061106
5 ACKNOWLEDGE CRITICAL DUMMY_ALARM 2021-05-19T21:48:05.845Z Alarm id 4 ACKNOWLEDGE.
11071107
6 UNACKNOWLEDGE CRITICAL DUMMY_ALARM 2021-05-19T21:53:24.484Z Alarm id 4 UNACKNOWLEDGE.
1108-
7 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:55:54.977Z :- signalHandler: Clearing simulated alarm
1108+
7 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:55:54.977Z signalHandler: Clearing simulated alarm
11091109
11101110
sonic# show event recent 24hr
11111111
----------------------------------------------------------------------------------------------------------------------------
11121112
Id Action Severity Name Timestamp Description
11131113
----------------------------------------------------------------------------------------------------------------------------
1114-
2 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:39:31.622Z :- signalHandler: Raising simulated alarm
1115-
3 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:42:34.371Z :- signalHandler: Clearing simulated alarm
1116-
4 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:46:14.371Z :- signalHandler: Raising simulated alarm
1114+
2 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:39:31.622Z signalHandler: Raising simulated alarm
1115+
3 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:42:34.371Z signalHandler: Clearing simulated alarm
1116+
4 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:46:14.371Z signalHandler: Raising simulated alarm
11171117
5 ACKNOWLEDGE CRITICAL DUMMY_ALARM 2021-05-19T21:48:05.845Z Alarm id 4 ACKNOWLEDGE.
11181118
6 UNACKNOWLEDGE CRITICAL DUMMY_ALARM 2021-05-19T21:53:24.484Z Alarm id 4 UNACKNOWLEDGE.
1119-
7 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:55:54.977Z :- signalHandler: Clearing simulated alarm
1119+
7 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:55:54.977Z signalHandler: Clearing simulated alarm
11201120
11211121
sonic# show event id 2
11221122
----------------------------------------------
@@ -1127,23 +1127,23 @@ Action: RAISE
11271127
Severity: CRITICAL
11281128
Type: DUMMY_ALARM
11291129
Timestamp 2021-05-19T21:39:31.622Z
1130-
Description: :- signalHandler: Raising simulated alarm
1130+
Description: signalHandler: Raising simulated alarm
11311131
Source: simulation
11321132
11331133
sonic# show event from 2 to 5
11341134
----------------------------------------------------------------------------------------------------------------------------
11351135
Id Action Severity Name Timestamp Description
11361136
----------------------------------------------------------------------------------------------------------------------------
1137-
2 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:39:31.622Z :- signalHandler: Raising simulated alarm
1138-
3 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:42:34.371Z :- signalHandler: Clearing simulated alarm
1139-
4 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:46:14.371Z :- signalHandler: Raising simulated alarm
1137+
2 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:39:31.622Z signalHandler: Raising simulated alarm
1138+
3 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:42:34.371Z signalHandler: Clearing simulated alarm
1139+
4 RAISE CRITICAL DUMMY_ALARM 2021-05-19T21:46:14.371Z signalHandler: Raising simulated alarm
11401140
5 ACKNOWLEDGE CRITICAL DUMMY_ALARM 2021-05-19T21:48:05.845Z Alarm id 4 ACKNOWLEDGE.
11411141
11421142
sonic# show event start 2021-05-19T21:39:31.622Z end 2021-05-19T21:46:14.371Z
11431143
----------------------------------------------------------------------------------------------------------------------------
11441144
Id Action Severity Name Timestamp Description
11451145
----------------------------------------------------------------------------------------------------------------------------
1146-
3 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:42:34.371Z :- signalHandler: Clearing simulated alarm
1146+
3 CLEAR CRITICAL DUMMY_ALARM 2021-05-19T21:42:34.371Z signalHandler: Clearing simulated alarm
11471147
11481148
sonic# show alarm [ acknowledged | all | detail | summary | severity <sev> | id <seq-id> | start <from-ts> end <to-ts> | recent <5min|1hr|1day> | from <from-seq> to <to-seq> ]
11491149
@@ -1153,16 +1153,16 @@ sonic# show alarm
11531153
----------------------------------------------------------------------------------------------------------------------------
11541154
Id Severity Name Timestamp Description
11551155
----------------------------------------------------------------------------------------------------------------------------
1156-
14 WARNING TEMPERATURE_EXCEEDED 2021-05-20T00:47:52.992Z :- temperatureCrossedThreshold: Current temperature of sensor/2 is 76 degrees
1156+
14 WARNING TEMPERATURE_EXCEEDED 2021-05-20T00:47:52.992Z temperatureCrossedThreshold: Current temperature of sensor/2 is 76 degrees
11571157
16 WARNING PSU_FAULT 2021-05-20T02:16:42.611Z :- /psu/2 has experienced a fault
11581158
11591159
sonic# show alarm all
11601160
----------------------------------------------------------------------------------------------------------------------------
11611161
Id Severity Name Timestamp Description
11621162
----------------------------------------------------------------------------------------------------------------------------
1163-
14 WARNING TEMPERATURE_EXCEEDED 2021-05-20T00:47:52.992Z :- temperatureCrossedThreshold: Current temperature of sensor/2 is 76 degrees
1164-
15 WARNING DUMMY_ALARM 2021-05-20T02:16:41.637Z :- signalHandler: Raising simulated alarm
1165-
16 WARNING PSU_FAULT 2021-05-20T02:16:42.611Z :- /psu/2 has experienced a fault
1163+
14 WARNING TEMPERATURE_EXCEEDED 2021-05-20T00:47:52.992Z temperatureCrossedThreshold: Current temperature of sensor/2 is 76 degrees
1164+
15 WARNING DUMMY_ALARM 2021-05-20T02:16:41.637Z signalHandler: Raising simulated alarm
1165+
16 WARNING PSU_FAULT 2021-05-20T02:16:42.611Z /psu/2 has experienced a fault
11661166
11671167
11681168
sonic# show alarm detail
@@ -1183,9 +1183,9 @@ sonic# show alarm from 14 to 16
11831183
----------------------------------------------------------------------------------------------------------------------------
11841184
Id Severity Name Timestamp Description
11851185
----------------------------------------------------------------------------------------------------------------------------
1186-
14 WARNING TEMPERATURE_EXCEEDED 2021-05-20T00:47:52.992Z :- temperatureCrossedThreshold: Current temperature of sensor/2 is 76 degrees
1187-
15 WARNING DUMMY_ALARM 2021-05-20T02:16:41.637Z :- signalHandler: Raising simulated alarm
1188-
16 WARNING PSU_FAULT 2021-05-20T02:16:42.611Z :- /psu/2 has experienced a fault
1186+
14 WARNING TEMPERATURE_EXCEEDED 2021-05-20T00:47:52.992Z temperatureCrossedThreshold: Current temperature of sensor/2 is 76 degrees
1187+
15 WARNING DUMMY_ALARM 2021-05-20T02:16:41.637Z signalHandler: Raising simulated alarm
1188+
16 WARNING PSU_FAULT 2021-05-20T02:16:42.611Z /psu/2 has experienced a fault
11891189
11901190
sonic# show alarm summary
11911191
Alarm summary

0 commit comments

Comments
 (0)