Conversation
Define libeventnotify for applications to use LOG_EVENT to raise events/alarms. Eventd to receive and store them in the DB. Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
…isord; Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
This reverts commit 7964d26.
Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
…tency. Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
…gnore it. throttle-timeout support to specify time duration to keep throttling the event from an applicaiton. Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
Signed-off-by: spenugondaa <srinadh.penugondaa@dell.com>
rajendra-dendukuri
left a comment
There was a problem hiding this comment.
- Please consider removing blank lines at at the end of newly added files
- At what point are Event tables saved from redisdb to the corresponding dump.rdb file? If so is there a usecase where a thermal shutdown happens and all the event history is lost. I agree that syslogs will have information of all the event notifications.
| "unix_socket_path": "/var/run/redis-chassis/redis_chassis.sock", | ||
| "persistence_for_warm_boot" : "yes" | ||
| }, | ||
| "redis1":{ |
There was a problem hiding this comment.
The reason for having a dedicated redis instance for event mgmt is because they are supposed to persist across reboots. If that is the intention, can we name this instance as redisp instead of redis1. Other applications can also use it.
There was a problem hiding this comment.
During the HLD review, we were asked to keep event/alarm tables in separate instance so that they wont grow too big that impacts other tables.
| Description=Eventd container | ||
| Requires=database.service | ||
| After=database.service | ||
| Before=ntp-config.service |
There was a problem hiding this comment.
Any particular reason for the before ntp-config service dependency?
There was a problem hiding this comment.
At that time, I thought there might be a scenario ntpd may want to raise an event/alarm.
src/sonic-eventd/debian/changelog
Outdated
|
|
||
| * Initial release. | ||
|
|
||
| -- Eventd <support@dell.com> Thu, 9 Apr 2020 12:00:00 -0800 |
There was a problem hiding this comment.
Can you confirm the date? 2020 or 2021?
|
|
||
| * Initial release. | ||
|
|
||
| -- Eventd <support@dell.com> Thu, 9 Apr 2020 12:00:00 -0800 |
| @@ -0,0 +1,2 @@ | |||
| #! /usr/bin/dh-exec | |||
| /usr/lib/x86_64-linux-gnu/libeventnotify.so.0 /usr/lib/x86_64-linux-gnu/libeventnotify.so | |||
There was a problem hiding this comment.
What about arm64 platforms?
| EventInfo tmp = (EventInfo) (it->second); | ||
| // discard the event as event_static_map shows enable is false for this event | ||
| if (tmp.enable == EVENT_ENABLE_FALSE_STR) { | ||
| SWSS_LOG_NOTICE("Discarding event <%s> as it is set to disabled", ev_id.c_str()); |
There was a problem hiding this comment.
Can this be SWSS_LOG_INFO? These are disabled events, may not be of great interest.
| m_alarmTable.set(ev_src, ack_vec); | ||
| m_eventTable.set(ev_src, ack_vec); | ||
| } else { | ||
| SWSS_LOG_ERROR(" %s/%s is already un-acknowledged", ev_id.c_str(), ev_src.c_str()); |
There was a problem hiding this comment.
Can this be NOTICE instead of ERROR. There is no error in eventd that has happened. It is an invalid input.
| m_alarmTable.set(ev_src, ack_vec); | ||
| m_eventTable.set(ev_src, ack_vec); | ||
| } else { | ||
| SWSS_LOG_ERROR(" %s/%s is not in raised state", ev_id.c_str(), ev_src.c_str()); |
There was a problem hiding this comment.
Can we make this NOTICE
| @@ -0,0 +1,2 @@ | |||
| /etc/eventd.json | |||
| /var/evprofile/default.json | |||
There was a problem hiding this comment.
Change this to /var/lib/evprofile/default.json
There was a problem hiding this comment.
May I know the reason?
The default.json is placed under sonic-eventd/var/evprofile/default.json so, the .install is using that path.
Should we rather put default.json in sonic-eventd/var/lib/evprofile/ ?
But why?
|
|
||
| sonic-db-cli EVENT_DB config set notify-keyspace-events AKE | ||
|
|
||
| cp /var/evprofile/default.json /etc/evprofile/default.json |
There was a problem hiding this comment.
cp /var/lib/evprofile/default.json /etc/evprofile/default.json
Signed-off-by: Srinadh Penugonda <srinadh.penugondaa@dell.com>
Why I did it
This PR contains code changes for providing Event and Alarm Framework as specified in the HLD
How I did it
Followed design specified in HLD.
How to verify it
A python script is developed to raise events, raise/clear/ack/unack alarms. The script verifies various counters from EVENT_STATS and ALARM_STATS tables.
Ran tests/event_unit_test.py
Dependent PRs
sonic-mgmt-framework
sonic-mgmt-common
sonic-swss-common