From 90a640e411aa0dabb91fd2983c7c89e714b19ce1 Mon Sep 17 00:00:00 2001 From: Zain Budhwani <99770260+zbud-msft@users.noreply.github.com> Date: Tue, 13 Sep 2022 11:07:47 -0700 Subject: [PATCH] Revert "Schema update (#22)" (#23) This reverts commit b74b2a15b5e1ed0ff38ce7fb0a9b807f2a78e40d. --- .../yang-events/sonic-events-host.yang | 69 +++++++++++-------- .../yang-events/sonic-events-pmon.yang | 40 +++++++++++ 2 files changed, 82 insertions(+), 27 deletions(-) create mode 100644 src/sonic-yang-models/yang-events/sonic-events-pmon.yang diff --git a/src/sonic-yang-models/yang-events/sonic-events-host.yang b/src/sonic-yang-models/yang-events/sonic-events-host.yang index fb1ba3449365..606ce661051e 100644 --- a/src/sonic-yang-models/yang-events/sonic-events-host.yang +++ b/src/sonic-yang-models/yang-events/sonic-events-host.yang @@ -45,29 +45,20 @@ module sonic-events-host { uses evtcmn:sonic-events-cmn; } - container cpu-usage { - oc-alarm-types:MINOR - - description " - Declares an event for memory usage crossing set limit - The parameters describe the usage & limit set."; - - uses evtcmn:sonic-events-usage; - - uses evtcmn:sonic-events-cmn; - } - container event-sshd { oc-alarm-types:MINOR description " Declares an event reported by sshd. - This implies an internal system state blocks sshd from - creating the new user."; + The fail type declares the type of failure. + INCORRECT_PASSWORD - denotes that sshd is sending + wrong password to AAA to intentionally fail this login."; - leaf username { - type string; - description "Name of the new user"; + leaf fail_type { + type enumeration { + enum "INCORRECT_PASSWD"; + } + description "Type of failure"; } uses evtcmn:sonic-events-cmn; @@ -119,32 +110,56 @@ module sonic-events-host { uses evtcmn:sonic-events-cmn; } - container event-down-ctr { + container event-monit-proc { eventcmn:EVENT_SEVERITY_2 description " - Declares an container that is expected to be up is down. - Reported by monit periodically."; + Declares an event reported by monit for a process + that is not running. + Params: + Name of the process that is not running. + The ASIC-index of that process."; - leaf ctr_name { + leaf proc_name { type string; - description "Name of the container not running"; + description "Name of the process not running"; default ""; } + leaf asic_index { + type uint8; + description "ASIC index in case of multi asic platform"; + default 0; + } + uses evtcmn:sonic-events-cmn; } - container event-stopped-ctr { + container event-monit-status { eventcmn:EVENT_SEVERITY_2 description " - Declare an event at the time point of container stopping. - event-down-ctr fires periodically until it starts up."; + Declares an event reported by monit for status check + failure for a process + Params: + Name of the process that is not running. + The ASIC-index of that process."; - leaf ctr-name { + leaf entity { + type string; + description "Name of the failing entity"; + default ""; + } + + leaf asic_index { + type uint8; + description "ASIC index in case of multi asic platform"; + default 0; + } + + leaf reason { type string; - description "Name of the container"; + description "Human readble text explaining failure"; default ""; } diff --git a/src/sonic-yang-models/yang-events/sonic-events-pmon.yang b/src/sonic-yang-models/yang-events/sonic-events-pmon.yang new file mode 100644 index 000000000000..a653e955915a --- /dev/null +++ b/src/sonic-yang-models/yang-events/sonic-events-pmon.yang @@ -0,0 +1,40 @@ +module sonic-events-pmon { + namespace "http://github.com/sonic-net/sonic-events-pmon"; + yang-version 1.1; + prefix events-pmon; + + import openconfig-alarm-types { + prefix oc-alarm-types; + } + import sonic-events-common { + prefix evtcmn; + revision-date 2022-12-01; + } + revision 2022-12-01 { + description "pmon alert events."; + } + + organization + "SONiC"; + contact + "SONiC"; + description + "SONIC pmon events"; + + container sonic-events-pmon { + container pmon-exited { + oc-alarm-types:MAJOR + + description " + Declares an event reportes by pmon for an unexpected exit. + The exited entity is the only param"; + + leaf entity { + type string; + description "entity that had unexpected exit"; + } + + uses evtcmn:sonic-events-cmn; + } + } +}