Skip to content

Commit b7c4b95

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

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Event and Alarm Framework
3333
* [3.1.4.6 Eventd continuous restart](#3146-event-continuous-restart)
3434
* [3.1.5 Event Profile](#315-event-profile)
3535
* [3.1.6 CLI](#316-cli)
36-
* [3.1.7 Event History Table and Current Alarm Table](#317-event-history-table-and-current-alarm-table)
36+
* [3.1.7 Event Table and Alarm Table](#317-event-table-and-alarm-table)
3737
* [3.1.8 Pull Model](#318-pull-model)
3838
* [3.1.9 Supporting third party containers](#319-supporting-third-party-containers)
3939
* [3.2 DB Changes](#32-db-changes)
@@ -103,14 +103,14 @@ Such a change has an important metric called *severity* to indicate how critical
103103

104104
Both events and alarms get recorded in a new DB called EVENT DB in a new redis instance.
105105

106-
1. Event History Table
106+
1. Event Table
107107

108-
All events get recorded in the event history table, by name, "EVENT". EVENT table contains history of all events generated by the system.
108+
All events get recorded in the event table, by name, "EVENT". EVENT table contains history of all events generated by the system.
109109
This table is persisted across system restarts of any kind, including restore to factory defaults and SW upgrades and downgrades.
110110

111-
2. Current Alarm Table
111+
2. Alarm Table
112112

113-
All events with an action field of *RAISE* get recorded in a table, by name, "ALARM" in addition to getting recorded in Event History Table ( only events corresponding to an alarm has action field ).
113+
All events with an action field of *RAISE* get recorded in a table, by name, "ALARM" in addition to getting recorded in Event Table ( only events corresponding to an alarm has action field ).
114114
When an application that raised the alarm clears it ( by sending an event with action *CLEAR* ), the alarm record is removed from ALARM table.
115115
An user acknowledging a particular alarm will NOT remove that alarm record from this table; only when application clears it, the alarm is removed from ALARM table.
116116

@@ -237,7 +237,7 @@ Application owners need to identify various conditions that would be of interest
237237
The feature involves new development.
238238
Applications act as producers by writing to a table with the help of event notify library.
239239
Eventd reads new record in the table and processes it:
240-
It saves the entry in event history table; if the event has an action and if it is *RAISE*, record gets added to alarm table, severity counter in ALARM_STATS is increased.
240+
It saves the entry in event table; if the event has an action and if it is *RAISE*, record gets added to alarm table, severity counter in ALARM_STATS is increased.
241241
If the received event action is *CLEAR*, record in the ALARM table is removed and severity counter in ALARM_STATS of that alarm is reduced by 1.
242242
If eventd receives an event with action *ACKNOWLEDGE* from mgmt-framework, severity counter in ALARM_STATS is reduced by 1.
243243
If eventd receives an event with action *UNACKNOWLEDGE* from mgmt-framework, severity counter in ALARM_STATS is increased by 1.
@@ -270,15 +270,15 @@ There are three players in the event framework. Producers, which raises events;
270270
Applications act as producers of events.
271271

272272
Event consumer class in eventd container receives and processes the received event.
273-
Event consumer manages received events, updates event history table, current alarm table, event_stats table and alarm_stats tables and invokes logging API, which constructs message and sends it over to syslog.
273+
Event consumer manages received events, updates event table, alarm table, event_stats table and alarm_stats tables and invokes logging API, which constructs message and sends it over to syslog.
274274

275275
Operator can chose to change properties of events with the help of event profile. Default
276276
event profile is available at */etc/evprofile/default.json*. User can download the default event profile,
277277
modify and upload it back to the switch to apply it.
278278

279279
Through event profile, user can change severity of any event and also can enable/disable a event.
280280

281-
Through CLI, REST or gNMI, event history table and current alarm table can be retrieved using various filters.
281+
Through CLI, REST or gNMI, event table and alarm table can be retrieved using various filters.
282282

283283
### 3.1.1 Event Producers
284284
Application that need to raise an event, need to use event notifiy API ( LOG_EVENT ).
@@ -385,7 +385,7 @@ As mentioned above, static information contains severity, static message and eve
385385
If the enable flag is set to false, event consumer ignores the event by logging a debug message.
386386
If the flag is set to true, it continues to process the event as follows:
387387
- Generate new sequence-id for the event
388-
- Write the event to Event History Table
388+
- Write the event to Event Table
389389
- It verifies if the event corresponds to an alarm - by checking the *action* field. If so, alarm consumer API is invoked for the event for further processing.
390390
- If action is RAISE_ALARM, add the record to ALARM table
391391
- If action is CLEAR_ALARM, remove the entry from ALARM table
@@ -403,7 +403,7 @@ Severity INFORMATIONAL is not applicable to alarms.
403403
Every new event should have a unique sequential ID. The sequence-id is persistent and continues to grow until 2 exp 64.
404404

405405
### 3.1.3 Alarm Consumer
406-
The alarm consume method on receiving the event record, verifies the event action. If it is RAISE_ALARM, it adds the record to Current Alarm Table.
406+
The alarm consume method on receiving the event record, verifies the event action. If it is RAISE_ALARM, it adds the record to Alarm Table.
407407
The counter in ALARM_STATS corresponding to the severity of the incoming alarm is increased by 1.
408408

409409
Eventd maintains a lookup map of *sequence-id* and pair of *event-id* and *resource* fields.
@@ -632,7 +632,7 @@ The framework will sanity check the user selected profile and merges it map of e
632632

633633
After a successful sanity check, the framework generates an event indicating that a new profile is in effect.
634634

635-
If there are any outstanding alarms in the current alarm table, the framework removes those records for which enable is set to false in the new profile.
635+
If there are any outstanding alarms in the alarm table, the framework removes those records for which enable is set to false in the new profile.
636636
Severity counters in ALARM_STATS are reduced accordingly.
637637

638638
Eventd starts using the merged map of characteristics for the all the newly generated events. A CUSTOM_EVPROFILE_CHANGE event is generated.
@@ -666,9 +666,9 @@ The rpc callback needs to access DB with the given set of sequence ids.
666666

667667
The gNMI server (gnoi_client.go, gnoi.go, sonic_proto, transl_utils.go) need to be extended to support the RPC to support similar operations for gNMI.
668668

669-
### 3.1.7 Event History Table and Current Alarm Table
670-
The Event History Table (EVENT) and Current Alarm List Table (ALARM) stored in EVENT_DB.
671-
The size of Event History Table is 40k records or 30 days worth of events which ever hits earlier.
669+
### 3.1.7 Event Table and Alarm Table
670+
The Event Table (EVENT) and Alarm List Table (ALARM) stored in EVENT_DB.
671+
The size of Event Table is 40k records or 30 days worth of events which ever hits earlier.
672672
A manifest file will be created with parameters to specify the number and number of days limits for
673673
eventd to read and enforce them.
674674

@@ -743,7 +743,7 @@ acked : Total alarms acknowledged {uint64}
743743
8) "0"
744744
127.0.0.1:6379[6]>
745745
```
746-
Current Alarm Table will not have any limits as it only contains the snapshot of the alarms during the current run.
746+
Alarm Table will not have any limits as it only contains the snapshot of the alarms during the current run.
747747

748748
Contents of an alarm record. In this case, the alarm was raised temperature crossed a threshold.
749749
```
@@ -811,7 +811,7 @@ informational : Number of alarms of severity 'informational' {uint64
811811
812812
```
813813
### 3.1.8 Pull Model
814-
All NBIs - CLI, REST and gNMI - can pull contents of current alarm table and event history table.
814+
All NBIs - CLI, REST and gNMI - can pull contents of alarm table and event table.
815815
The following filters are supported:
816816
- ALL ( pulls all alarms)
817817
- Severity.
@@ -839,7 +839,7 @@ Approach 1 is preferred.
839839
A new instance, redis4, is created and EVENT DB uses the new instance.
840840
The following tables uses Event DB.
841841
Table EVENTPUBSUB is used for applications to write events and for eventd to access and process them.
842-
Event History Table (EVENT) and Current Alarm Table (ALARM) are used to house events and alarms respectively.
842+
Event Table (EVENT) and Alarm Table (ALARM) are used to house events and alarms respectively.
843843
To maintain various statistics of events, these two tables are used : EVENT_STATS and ALARM_STATS.
844844

845845
EVPROFILE table is used by mgmt-framework to communicate name of the custom event profile when configured through NBI.
@@ -1009,11 +1009,11 @@ sonic# event profile <profile-name>
10091009
The command takes name of specified file, validates it for its syntax and values; merges it with its internal static map of events *static_event_map*.
10101010

10111011
```
1012-
sonic# clear event history
1012+
sonic# clear event
10131013
```
1014-
This command clears all the records in the event history table. All the event stats are cleared.
1014+
This command clears all the records in the event table. All the event stats are cleared.
10151015
The command will not affect alarm table or alarm statistics.
1016-
Eventd generates an event informing that event history table is cleared.
1016+
Eventd generates an event informing that event table is cleared.
10171017

10181018
#### 3.3.2.2 Configuration Commands
10191019
```
@@ -1238,9 +1238,9 @@ When eventd is restarted, events and alarms raised by applications will be waiti
12381238
When eventd eventually comes back up, it reads those records in the queue.
12391239

12401240
# 6 Scalability
1241-
In this feature, scalability applies to Event History Table (EVENT). As it is persistent and it records every event generated on the system, to protect
1241+
In this feature, scalability applies to Event Table (EVENT). As it is persistent and it records every event generated on the system, to protect
12421242
against it growing indefinitely, user can limit its size through a manifest file.
1243-
By default, the size of Event History Table is set to 40k events or events for 30 days - after which, older records are discarded to make way for new records.
1243+
By default, the size of Event Table is set to 40k events or events for 30 days - after which, older records are discarded to make way for new records.
12441244

12451245
# 7 Showtech support
12461246
The techsupport bundle is upgraded to include output of "show event recent 60min” and “show alarm all”.

0 commit comments

Comments
 (0)