Skip to content

Commit

Permalink
Revert "Schema update (sonic-net#22)" (sonic-net#23)
Browse files Browse the repository at this point in the history
This reverts commit b74b2a1.
  • Loading branch information
zbud-msft authored Sep 13, 2022
1 parent b74b2a1 commit 90a640e
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 27 deletions.
69 changes: 42 additions & 27 deletions src/sonic-yang-models/yang-events/sonic-events-host.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 "";
}

Expand Down
40 changes: 40 additions & 0 deletions src/sonic-yang-models/yang-events/sonic-events-pmon.yang
Original file line number Diff line number Diff line change
@@ -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;
}
}
}

0 comments on commit 90a640e

Please sign in to comment.