blob: f14ef736297557d330ad14c225fe47e6aec6d66e [file] [log] [blame]
Tomáš Pecka6a2334b2022-07-12 13:57:54 +02001module ietf-alarms {
2 yang-version 1.1;
3 namespace "urn:ietf:params:xml:ns:yang:ietf-alarms";
4 prefix al;
5
6 import ietf-yang-types {
7 prefix yang;
8 reference
9 "RFC 6991: Common YANG Data Types.";
10 }
11
12 organization
13 "IETF CCAMP Working Group";
14 contact
15 "WG Web: <https://trac.ietf.org/trac/ccamp>
16 WG List: <mailto:ccamp@ietf.org>
17
18 Editor: Stefan Vallin
19 <mailto:stefan@wallan.se>
20
21 Editor: Martin Bjorklund
22 <mailto:mbj@tail-f.com>";
23 description
24 "This module defines an interface for managing alarms. Main
25 inputs to the module design are the 3GPP Alarm Integration
26 Reference Point (IRP), ITU-T X.733, and ANSI/ISA-18.2 alarm
27 standards.
28
29 Main features of this module include:
30
31 * Alarm list:
32 A list of all alarms. Cleared alarms stay in
33 the list until explicitly purged.
34
35 * Operator actions on alarms:
36 Acknowledging and closing alarms.
37
38 * Administrative actions on alarms:
39 Purging alarms from the list according to specific
40 criteria.
41
42 * Alarm inventory:
43 A management application can read all
44 alarm types implemented by the system.
45
46 * Alarm shelving:
47 Shelving (blocking) alarms according
48 to specific criteria.
49
50 * Alarm profiles:
51 A management system can attach further
52 information to alarm types, for example,
53 overriding system-default severity
54 levels.
55
56 This module uses a stateful view on alarms. An alarm is a state
57 for a specific resource (note that an alarm is not a
58 notification). An alarm type is a possible alarm state for a
59 resource. For example, the tuple:
60
61 ('link-alarm', 'GigabitEthernet0/25')
62
63 is an alarm of type 'link-alarm' on the resource
64 'GigabitEthernet0/25'.
65
66 Alarm types are identified using YANG identities and an optional
67 string-based qualifier. The string-based qualifier allows for
68 dynamic extension of the statically defined alarm types. Alarm
69 types identify a possible alarm state and not the individual
70 notifications. For example, the traditional 'link-down' and
71 'link-up' notifications are two notifications referring to the
72 same alarm type 'link-alarm'.
73
74 With this design, there is no ambiguity about how alarm and
75 alarm clear correlation should be performed; notifications that
76 report the same resource and alarm type are considered updates
77 of the same alarm, e.g., clearing an active alarm or changing
78 the severity of an alarm. The instrumentation can update the
79 severity and alarm text on an existing alarm. The above alarm
80 example can therefore look like the following:
81
82 (('link-alarm', 'GigabitEthernet0/25'),
83 warning,
84 'interface down while interface admin state is up')
85
86 There is a clear separation between updates on the alarm from
87 the underlying resource, like clear, and updates from an
88 operator, like acknowledging or closing an alarm:
89
90 (('link-alarm', 'GigabitEthernet0/25'),
91 warning,
92 'interface down while interface admin state is up',
93 cleared,
94 closed)
95
96 Administrative actions like removing closed alarms older than a
97 given time is supported.
98
99 This YANG module does not define how the underlying
100 instrumentation detects and clears the specific alarms. That
101 belongs to the Standards Development Organization (SDO) or
102 enterprise that owns that specific technology.
103
104 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
105 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
106 'MAY', and 'OPTIONAL' in this document are to be interpreted as
107 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
108 they appear in all capitals, as shown here.
109
110 Copyright (c) 2019 IETF Trust and the persons identified as
111 authors of the code. All rights reserved.
112
113 Redistribution and use in source and binary forms, with or
114 without modification, is permitted pursuant to, and subject to
115 the license terms contained in, the Simplified BSD License set
116 forth in Section 4.c of the IETF Trust's Legal Provisions
117 Relating to IETF Documents
118 (https://trustee.ietf.org/license-info).
119
120 This version of this YANG module is part of RFC 8632; see
121 the RFC itself for full legal notices.";
122
123 revision 2019-09-11 {
124 description
125 "Initial revision.";
126 reference
127 "RFC 8632: A YANG Data Model for Alarm Management";
128 }
129
130 /*
131 * Features
132 */
133
134 feature operator-actions {
135 description
136 "This feature indicates that the system supports operator
137 states on alarms.";
138 }
139
140 feature alarm-shelving {
141 description
142 "This feature indicates that the system supports shelving
143 (blocking) alarms.
144
145 Alarm shelving may have an impact on server processing
146 resources in order to match alarms against shelf
147 criteria.";
148 }
149
150 feature alarm-history {
151 description
152 "This feature indicates that the server maintains a history
153 of state changes for each alarm. For example, if an alarm
154 toggles between cleared and active 10 times, these state
155 changes are present in a separate list in the alarm.
156
157 Keeping the alarm history may have an impact on server
158 memory resources.";
159 }
160
161 feature alarm-summary {
162 description
163 "This feature indicates that the server summarizes the number
164 of alarms per severity and operator state.";
165 }
166
167 feature alarm-profile {
168 description
169 "The system enables clients to configure further information
170 to each alarm type.";
171 }
172
173 feature severity-assignment {
174 description
175 "The system supports configurable alarm severity levels.";
176 reference
177 "ITU-T Recommendation M.3100:
178 Generic network information model
179 ITU-T Recommendation M.3160:
180 Generic, protocol-neutral management information model";
181 }
182
183 feature root-cause-analysis {
184 description
185 "The system supports identifying candidate root-cause
186 resources for an alarm, for example, a disk partition
187 root cause for a logger failure alarm.";
188 }
189
190 feature service-impact-analysis {
191 description
192 "The system supports identifying candidate-impacted
193 resources for an alarm, for example, an interface state change
194 resulting in a link alarm, which can refer to a link as being
195 impacted.";
196 }
197
198 feature alarm-correlation {
199 description
200 "The system supports correlating/grouping alarms
201 that belong together.";
202 }
203
204 /*
205 * Identities
206 */
207
208 identity alarm-type-id {
209 description
210 "Base identity for alarm types. A unique identification of
211 the alarm, not including the resource. Different resources
212 can share alarm types. If the resource reports the same
213 alarm type, it is considered to be the same alarm. The alarm
214 type is a simplification of the different X.733 and 3GPP Alarm
215 IRP correlation mechanisms, and it allows for
216 hierarchical extensions.
217
218 A string-based qualifier can be used in addition to the
219 identity in order to have different alarm types based on
220 information not known at design time, such as values in
221 textual SNMP Notification varbinds.
222
223 Standards and vendors can define sub-identities to clearly
224 identify specific alarm types.
225
226 This identity is abstract and MUST NOT be used for alarms.";
227 }
228
229 /*
230 * Common types
231 */
232
233 typedef resource {
234 type union {
235 type instance-identifier {
236 require-instance false;
237 }
238 type yang:object-identifier;
239 type string;
240 type yang:uuid;
241 }
242 description
243 "This is an identification of the alarming resource, such as an
244 interface. It should be as fine-grained as possible to both
245 guide the operator and guarantee uniqueness of the alarms.
246
247 If the alarming resource is modeled in YANG, this type will
248 be an instance-identifier.
249
250 If the resource is an SNMP object, the type will be an
251 'object-identifier'.
252
253 If the resource is anything else, for example, a distinguished
254 name or a Common Information Model (CIM) path, this type will
255 be a string.
256
257 If the alarming object is identified by a Universally Unique
258 Identifier (UUID), use the uuid type. Be cautious when using
259 this type, since a UUID is hard to use for an operator.
260
261 If the server supports several models, the precedence should
262 be in the order as given in the union definition.";
263 }
264
265 typedef resource-match {
266 type union {
267 type yang:xpath1.0;
268 type yang:object-identifier;
269 type string;
270 }
271 description
272 "This type is used to match resources of type 'resource'.
273 Since the type 'resource' is a union of different types, the
274 'resource-match' type is also a union of corresponding types.
275
276 If the type is given as an XPath 1.0 expression, a resource
277 of type 'instance-identifier' matches if the instance is part
278 of the node set that is the result of evaluating the XPath 1.0
279 expression. For example, the XPath 1.0 expression:
280
281 /ietf-interfaces:interfaces/ietf-interfaces:interface
282 [ietf-interfaces:type='ianaift:ethernetCsmacd']
283
284 would match the resource instance-identifier:
285
286 /if:interfaces/if:interface[if:name='eth1'],
287
288 assuming that the interface 'eth1' is of type
289 'ianaift:ethernetCsmacd'.
290
291 If the type is given as an object identifier, a resource of
292 type 'object-identifier' matches if the match object
293 identifier is a prefix of the resource's object identifier.
294 For example, the value:
295
296 1.3.6.1.2.1.2.2
297
298 would match the resource object identifier:
299
300 1.3.6.1.2.1.2.2.1.1.5
301
302 If the type is given as an UUID or a string, it is interpreted
303 as an XML Schema regular expression, which matches a resource
304 of type 'yang:uuid' or 'string' if the given regular
305 expression matches the resource string.
306
307 If the type is given as an XPath expression, it is evaluated
308 in the following XPath context:
309
310 o The set of namespace declarations is the set of prefix
311 and namespace pairs for all YANG modules implemented by
312 the server, where the prefix is the YANG module name and
313 the namespace is as defined by the 'namespace' statement
314 in the YANG module.
315
316 If a leaf of this type is encoded in XML, all namespace
317 declarations in scope on the leaf element are added to
318 the set of namespace declarations. If a prefix found in
319 the XML is already present in the set of namespace
320 declarations, the namespace in the XML is used.
321
322 o The set of variable bindings is empty.
323
324 o The function library is the core function library, and
325 the functions are defined in Section 10 of RFC 7950.
326
327 o The context node is the root node in the data tree.";
328 reference
329 "XML Schema Part 2: Datatypes Second Edition,
330 World Wide Web Consortium Recommendation
331 REC-xmlschema-2-20041028";
332 }
333
334 typedef alarm-text {
335 type string;
336 description
337 "The string used to inform operators about the alarm. This
338 MUST contain enough information for an operator to be able to
339 understand the problem and how to resolve it. If this string
340 contains structure, this format should be clearly documented
341 for programs to be able to parse that information.";
342 }
343
344 typedef severity {
345 type enumeration {
346 enum indeterminate {
347 value 2;
348 description
349 "Indicates that the severity level could not be
350 determined. This level SHOULD be avoided.";
351 }
352 enum warning {
353 value 3;
354 description
355 "The 'warning' severity level indicates the detection of a
356 potential or impending service-affecting fault, before any
357 significant effects have been felt. Action should be
358 taken to further diagnose (if necessary) and correct the
359 problem in order to prevent it from becoming a more
360 serious service-affecting fault.";
361 }
362 enum minor {
363 value 4;
364 description
365 "The 'minor' severity level indicates the existence of a
366 non-service-affecting fault condition and that corrective
367 action should be taken in order to prevent a more serious
368 (for example, service-affecting) fault. Such a severity
369 can be reported, for example, when the detected alarm
370 condition is not currently degrading the capacity of the
371 resource.";
372 }
373 enum major {
374 value 5;
375 description
376 "The 'major' severity level indicates that a service-
377 affecting condition has developed and an urgent corrective
378 action is required. Such a severity can be reported, for
379 example, when there is a severe degradation in the
380 capability of the resource and its full capability must be
381 restored.";
382 }
383 enum critical {
384 value 6;
385 description
386 "The 'critical' severity level indicates that a service-
387 affecting condition has occurred and an immediate
388 corrective action is required. Such a severity can be
389 reported, for example, when a resource becomes totally out
390 of service and its capability must be restored.";
391 }
392 }
393 description
394 "The severity level of the alarm. Note well that the value
395 'clear' is not included. Whether or not an alarm is cleared
396 is a separate boolean flag.";
397 reference
398 "ITU-T Recommendation X.733: Information Technology
399 - Open Systems Interconnection
400 - System Management: Alarm Reporting Function";
401 }
402
403 typedef severity-with-clear {
404 type union {
405 type enumeration {
406 enum cleared {
407 value 1;
408 description
409 "The alarm is cleared by the instrumentation.";
410 }
411 }
412 type severity;
413 }
414 description
415 "The severity level of the alarm including clear. This is used
416 only in notifications reporting state changes for an alarm.";
417 }
418
419 typedef writable-operator-state {
420 type enumeration {
421 enum none {
422 value 1;
423 description
424 "The alarm is not being taken care of.";
425 }
426 enum ack {
427 value 2;
428 description
429 "The alarm is being taken care of. Corrective action not
430 taken yet or has failed";
431 }
432 enum closed {
433 value 3;
434 description
435 "Corrective action taken successfully.";
436 }
437 }
438 description
439 "Operator states on an alarm. The 'closed' state indicates
440 that an operator considers the alarm being resolved. This is
441 separate from the alarm's 'is-cleared' leaf.";
442 }
443
444 typedef operator-state {
445 type union {
446 type writable-operator-state;
447 type enumeration {
448 enum shelved {
449 value 4;
450 description
451 "The alarm is shelved. Alarms in /alarms/shelved-alarms/
452 MUST be assigned this operator state by the server as
453 the last entry in the 'operator-state-change' list. The
454 text for that entry SHOULD include the shelf name.";
455 }
456 enum un-shelved {
457 value 5;
458 description
459 "The alarm is moved back to 'alarm-list' from a shelf.
460 Alarms that are moved from /alarms/shelved-alarms/ to
461 /alarms/alarm-list MUST be assigned this state by the
462 server as the last entry in the 'operator-state-change'
463 list. The text for that entry SHOULD include the shelf
464 name.";
465 }
466 }
467 }
468 description
469 "Operator states on an alarm. The 'closed' state indicates
470 that an operator considers the alarm being resolved. This is
471 separate from the alarm's 'is-cleared' leaf.";
472 }
473
474 /* Alarm type */
475
476 typedef alarm-type-id {
477 type identityref {
478 base alarm-type-id;
479 }
480 description
481 "Identifies an alarm type. The description of the alarm type
482 id MUST indicate whether or not the alarm type is abstract.
483 An abstract alarm type is used as a base for other alarm type
484 ids and will not be used as a value for an alarm or be present
485 in the alarm inventory.";
486 }
487
488 typedef alarm-type-qualifier {
489 type string;
490 description
491 "If an alarm type cannot be fully specified at design time by
492 'alarm-type-id', this string qualifier is used in addition to
493 fully define a unique alarm type.
494
495 The definition of alarm qualifiers is considered to be part of
496 the instrumentation and is out of scope for this module. An
497 empty string is used when this is part of a key.";
498 }
499
500 /*
501 * Groupings
502 */
503
504 grouping common-alarm-parameters {
505 description
506 "Common parameters for an alarm.
507
508 This grouping is used both in the alarm list and in the
509 notification representing an alarm-state change.";
510 leaf resource {
511 type resource;
512 mandatory true;
513 description
514 "The alarming resource. See also 'alt-resource'. This could
515 be, for example, a reference to the alarming interface";
516 }
517 leaf alarm-type-id {
518 type alarm-type-id;
519 mandatory true;
520 description
521 "This leaf and the leaf 'alarm-type-qualifier' together
522 provide a unique identification of the alarm type.";
523 }
524 leaf alarm-type-qualifier {
525 type alarm-type-qualifier;
526 description
527 "This leaf is used when the 'alarm-type-id' leaf cannot
528 uniquely identify the alarm type. Normally, this is not the
529 case, and this leaf is the empty string.";
530 }
531 leaf-list alt-resource {
532 type resource;
533 description
534 "Used if the alarming resource is available over other
535 interfaces. This field can contain SNMP OIDs, CIM paths, or
536 3GPP distinguished names, for example.";
537 }
538 list related-alarm {
539 if-feature "alarm-correlation";
540 key "resource alarm-type-id alarm-type-qualifier";
541 description
542 "References to related alarms. Note that the related alarm
543 might have been purged from the alarm list.";
544 leaf resource {
545 type leafref {
546 path "/alarms/alarm-list/alarm/resource";
547 require-instance false;
548 }
549 description
550 "The alarming resource for the related alarm.";
551 }
552 leaf alarm-type-id {
553 type leafref {
554 path "/alarms/alarm-list/alarm"
555 + "[resource=current()/../resource]"
556 + "/alarm-type-id";
557 require-instance false;
558 }
559 description
560 "The alarm type identifier for the related alarm.";
561 }
562 leaf alarm-type-qualifier {
563 type leafref {
564 path "/alarms/alarm-list/alarm"
565 + "[resource=current()/../resource]"
566 + "[alarm-type-id=current()/../alarm-type-id]"
567 + "/alarm-type-qualifier";
568 require-instance false;
569 }
570 description
571 "The alarm qualifier for the related alarm.";
572 }
573 }
574 leaf-list impacted-resource {
575 if-feature "service-impact-analysis";
576 type resource;
577 description
578 "Resources that might be affected by this alarm. If the
579 system creates an alarm on a resource and also has a mapping
580 to other resources that might be impacted, these resources
581 can be listed in this leaf-list. In this way, the system
582 can create one alarm instead of several. For example, if an
583 interface has an alarm, the 'impacted-resource' can
584 reference the aggregated port channels.";
585 }
586 leaf-list root-cause-resource {
587 if-feature "root-cause-analysis";
588 type resource;
589 description
590 "Resources that are candidates for causing the alarm. If the
591 system has a mechanism to understand the candidate root
592 causes of an alarm, this leaf-list can be used to list the
593 root-cause candidate resources. In this way, the system can
594 create one alarm instead of several. An example might be a
595 logging system (alarm resource) that fails; the alarm can
596 reference the file system in the 'root-cause-resource'
597 leaf-list. Note that the intended use is not to also send
598 an alarm with the 'root-cause-resource' as an alarming
599 resource. The 'root-cause-resource' leaf-list is a hint and
600 should not also generate an alarm for the same problem.";
601 }
602 }
603
604 grouping alarm-state-change-parameters {
605 description
606 "Parameters for an alarm-state change.
607
608 This grouping is used both in the alarm list's status-change
609 list and in the notification representing an alarm-state
610 change.";
611 leaf time {
612 type yang:date-and-time;
613 mandatory true;
614 description
615 "The time the status of the alarm changed. The value
616 represents the time the real alarm-state change appeared in
617 the resource and not when it was added to the alarm
618 list. The /alarm-list/alarm/last-changed MUST be set to the
619 same value.";
620 }
621 leaf perceived-severity {
622 type severity-with-clear;
623 mandatory true;
624 description
625 "The severity of the alarm as defined by X.733. Note that
626 this may not be the original severity since the alarm may
627 have changed severity.";
628 reference
629 "ITU-T Recommendation X.733: Information Technology
630 - Open Systems Interconnection
631 - System Management: Alarm Reporting Function";
632 }
633 leaf alarm-text {
634 type alarm-text;
635 mandatory true;
636 description
637 "A user-friendly text describing the alarm-state change.";
638 reference
639 "ITU-T Recommendation X.733: Information Technology
640 - Open Systems Interconnection
641 - System Management: Alarm Reporting Function";
642 }
643 }
644
645 grouping operator-parameters {
646 description
647 "This grouping defines parameters that can be changed by an
648 operator.";
649 leaf time {
650 type yang:date-and-time;
651 mandatory true;
652 description
653 "Timestamp for operator action on the alarm.";
654 }
655 leaf operator {
656 type string;
657 mandatory true;
658 description
659 "The name of the operator that has acted on this alarm.";
660 }
661 leaf state {
662 type operator-state;
663 mandatory true;
664 description
665 "The operator's view of the alarm state.";
666 }
667 leaf text {
668 type string;
669 description
670 "Additional optional textual information provided by the
671 operator.";
672 }
673 }
674
675 grouping resource-alarm-parameters {
676 description
677 "Alarm parameters that originate from the resource view.";
678 leaf is-cleared {
679 type boolean;
680 mandatory true;
681 description
682 "Indicates the current clearance state of the alarm. An
683 alarm might toggle from active alarm to cleared alarm and
684 back to active again.";
685 }
686 leaf last-raised {
687 type yang:date-and-time;
688 mandatory true;
689 description
690 "An alarm may change severity level and toggle between
691 active and cleared during its lifetime. This leaf indicates
692 the last time it was raised ('is-cleared' = 'false').";
693 }
694 leaf last-changed {
695 type yang:date-and-time;
696 mandatory true;
697 description
698 "A timestamp when the 'status-change' or
699 'operator-state-change' list was last changed.";
700 }
701 leaf perceived-severity {
702 type severity;
703 mandatory true;
704 description
705 "The last severity of the alarm.
706
707 If an alarm was raised with severity 'warning' but later
708 changed to 'major', this leaf will show 'major'.";
709 }
710 leaf alarm-text {
711 type alarm-text;
712 mandatory true;
713 description
714 "The last reported alarm text. This text should contain
715 information for an operator to be able to understand the
716 problem and how to resolve it.";
717 }
718 list status-change {
719 if-feature "alarm-history";
720 key "time";
721 min-elements 1;
722 description
723 "A list of status-change events for this alarm.
724
725 The entry with latest timestamp in this list MUST
726 correspond to the leafs 'is-cleared', 'perceived-severity',
727 and 'alarm-text' for the alarm.
728
729 This list is ordered according to the timestamps of alarm
730 state changes. The first item corresponds to the latest
731 state change.
732
733 The following state changes create an entry in this
734 list:
735 - changed severity (warning, minor, major, critical)
736 - clearance status; this also updates the 'is-cleared'
737 leaf
738 - alarm-text update";
739 uses alarm-state-change-parameters;
740 }
741 }
742
743 grouping filter-input {
744 description
745 "Grouping to specify a filter construct on alarm information.";
746 leaf alarm-clearance-status {
747 type enumeration {
748 enum any {
749 description
750 "Ignore alarm-clearance status.";
751 }
752 enum cleared {
753 description
754 "Filter cleared alarms.";
755 }
756 enum not-cleared {
757 description
758 "Filter not-cleared alarms.";
759 }
760 }
761 mandatory true;
762 description
763 "The clearance status of the alarm.";
764 }
765 container older-than {
766 presence "Age specification";
767 description
768 "Matches the 'last-status-change' leaf in the alarm.";
769 choice age-spec {
770 description
771 "Filter using date and time age.";
772 case seconds {
773 leaf seconds {
774 type uint16;
775 description
776 "Age expressed in seconds.";
777 }
778 }
779 case minutes {
780 leaf minutes {
781 type uint16;
782 description
783 "Age expressed in minutes.";
784 }
785 }
786 case hours {
787 leaf hours {
788 type uint16;
789 description
790 "Age expressed in hours.";
791 }
792 }
793 case days {
794 leaf days {
795 type uint16;
796 description
797 "Age expressed in days.";
798 }
799 }
800 case weeks {
801 leaf weeks {
802 type uint16;
803 description
804 "Age expressed in weeks.";
805 }
806 }
807 }
808 }
809 container severity {
810 presence "Severity filter";
811 choice sev-spec {
812 description
813 "Filter based on severity level.";
814 leaf below {
815 type severity;
816 description
817 "Severity less than this leaf.";
818 }
819 leaf is {
820 type severity;
821 description
822 "Severity level equal to this leaf.";
823 }
824 leaf above {
825 type severity;
826 description
827 "Severity level higher than this leaf.";
828 }
829 }
830 description
831 "Filter based on severity.";
832 }
833 container operator-state-filter {
834 if-feature "operator-actions";
835 presence "Operator state filter";
836 leaf state {
837 type operator-state;
838 description
839 "Filter on operator state.";
840 }
841 leaf user {
842 type string;
843 description
844 "Filter based on which operator.";
845 }
846 description
847 "Filter based on operator state.";
848 }
849 }
850
851 /*
852 * The /alarms data tree
853 */
854
855 container alarms {
856 description
857 "The top container for this module.";
858 container control {
859 description
860 "Configuration to control the alarm behavior.";
861 leaf max-alarm-status-changes {
862 type union {
863 type uint16;
864 type enumeration {
865 enum infinite {
866 description
867 "The status-change entries are accumulated
868 infinitely.";
869 }
870 }
871 }
872 default "32";
873 description
874 "The 'status-change' entries are kept in a circular list
875 per alarm. When this number is exceeded, the oldest
876 status change entry is automatically removed. If the
877 value is 'infinite', the status-change entries are
878 accumulated infinitely.";
879 }
880 leaf notify-status-changes {
881 type enumeration {
882 enum all-state-changes {
883 description
884 "Send notifications for all status changes.";
885 }
886 enum raise-and-clear {
887 description
888 "Send notifications only for raise, clear, and
889 re-raise. Notifications for severity-level changes or
890 alarm-text changes are not sent.";
891 }
892 enum severity-level {
893 description
894 "Only send notifications for alarm-state changes
895 crossing the level specified in
896 'notify-severity-level'. Always send clear
897 notifications.";
898 }
899 }
900 must '. != "severity-level" or ../notify-severity-level' {
901 description
902 "When notify-status-changes is 'severity-level', a value
903 must be given for 'notify-severity-level'.";
904 }
905 default "all-state-changes";
906 description
907 "This leaf controls the notifications sent for alarm status
908 updates. There are three options:
909
910 1. Notifications are sent for all updates, severity-level
911 changes, and alarm-text changes.
912
913 2. Notifications are only sent for alarm raise and clear.
914
915 3. Notifications are sent for status changes equal to or
916 above the specified severity level. Clear
917 notifications shall always be sent. Notifications
918 shall also be sent for state changes that make an
919 alarm less severe than the specified level.
920
921 For example, in option 3, assume that the severity level
922 is set to major and that the alarm has the following state
923 changes:
924
925 [(Time, severity, clear)]:
926 [(T1, major, -), (T2, minor, -), (T3, warning, -),
927 (T4, minor, -), (T5, major, -), (T6, critical, -),
928 (T7, major. -), (T8, major, clear)]
929
930 In that case, notifications will be sent at times
931 T1, T2, T5, T6, T7, and T8.";
932 }
933 leaf notify-severity-level {
934 when '../notify-status-changes = "severity-level"';
935 type severity;
936 description
937 "Only send notifications for alarm-state changes crossing
938 the specified level. Always send clear notifications.";
939 }
940 container alarm-shelving {
941 if-feature "alarm-shelving";
942 description
943 "The 'alarm-shelving/shelf' list is used to shelve
944 (block/filter) alarms. The conditions in the shelf
945 criteria are logically ANDed. The first matching shelf is
946 used, and an alarm is shelved only for this first match.
947 Matching alarms MUST appear in the
948 /alarms/shelved-alarms/shelved-alarm list, and
949 non-matching /alarms MUST appear in the
950 /alarms/alarm-list/alarm list. The server does not send
951 any notifications for shelved alarms.
952
953 The server MUST maintain states (e.g., severity
954 changes) for the shelved alarms.
955
956 Alarms that match the criteria shall have an
957 operator state 'shelved'. When the shelf
958 configuration removes an alarm from the shelf, the server
959 shall add the operator state 'un-shelved'.";
960 list shelf {
961 key "name";
962 ordered-by user;
963 leaf name {
964 type string;
965 description
966 "An arbitrary name for the alarm shelf.";
967 }
968 description
969 "Each entry defines the criteria for shelving alarms.
970 Criteria are ANDed. If no criteria are specified,
971 all alarms will be shelved.";
972 leaf-list resource {
973 type resource-match;
974 description
975 "Shelve alarms for matching resources.";
976 }
977 list alarm-type {
978 key "alarm-type-id alarm-type-qualifier-match";
979 description
980 "Any alarm matching the combined criteria of
981 'alarm-type-id' and 'alarm-type-qualifier-match'
982 MUST be matched.";
983 leaf alarm-type-id {
984 type alarm-type-id;
985 description
986 "Shelve all alarms that have an 'alarm-type-id' that
987 is equal to or derived from the given
988 'alarm-type-id'.";
989 }
990 leaf alarm-type-qualifier-match {
991 type string;
992 description
993 "An XML Schema regular expression that is used to
994 match an alarm type qualifier. Shelve all alarms
995 that match this regular expression for the alarm
996 type qualifier.";
997 reference
998 "XML Schema Part 2: Datatypes Second Edition,
999 World Wide Web Consortium Recommendation
1000 REC-xmlschema-2-20041028";
1001 }
1002 }
1003 leaf description {
1004 type string;
1005 description
1006 "An optional textual description of the shelf. This
1007 description should include the reason for shelving
1008 these alarms.";
1009 }
1010 }
1011 }
1012 }
1013 container alarm-inventory {
1014 config false;
1015 description
1016 "The 'alarm-inventory/alarm-type' list contains all possible
1017 alarm types for the system.
1018
1019 If the system knows for which resources a specific alarm
1020 type can appear, it is also identified in the inventory.
1021 The list also tells if each alarm type has a corresponding
1022 clear state. The inventory shall only contain concrete
1023 alarm types.
1024
1025 The alarm inventory MUST be updated by the system when new
1026 alarms can appear. This can be the case when installing new
1027 software modules or inserting new card types. A
1028 notification 'alarm-inventory-changed' is sent when the
1029 inventory is changed.";
1030 list alarm-type {
1031 key "alarm-type-id alarm-type-qualifier";
1032 description
1033 "An entry in this list defines a possible alarm.";
1034 leaf alarm-type-id {
1035 type alarm-type-id;
1036 description
1037 "The statically defined alarm type identifier for this
1038 possible alarm.";
1039 }
1040 leaf alarm-type-qualifier {
1041 type alarm-type-qualifier;
1042 description
1043 "The optionally dynamically defined alarm type identifier
1044 for this possible alarm.";
1045 }
1046 leaf-list resource {
1047 type resource-match;
1048 description
1049 "Optionally, specifies for which resources the alarm type
1050 is valid.";
1051 }
1052 leaf will-clear {
1053 type boolean;
1054 mandatory true;
1055 description
1056 "This leaf tells the operator if the alarm will be
1057 cleared when the correct corrective action has been
1058 taken. Implementations SHOULD strive for detecting the
1059 cleared state for all alarm types.
1060
1061 If this leaf is 'true', the operator can monitor the
1062 alarm until it becomes cleared after the corrective
1063 action has been taken.
1064
1065 If this leaf is 'false', the operator needs to validate
1066 that the alarm is no longer active using other
1067 mechanisms. Alarms can lack a corresponding clear due
1068 to missing instrumentation or no logical
1069 corresponding clear state.";
1070 }
1071 leaf-list severity-level {
1072 type severity;
1073 description
1074 "This leaf-list indicates the possible severity levels of
1075 this alarm type. Note well that 'clear' is not part of
1076 the severity type. In general, the severity level
1077 should be defined by the instrumentation based on the
1078 dynamic state, rather than being defined statically by
1079 the alarm type, in order to provide a relevant severity
1080 level based on dynamic state and context. However, most
1081 alarm types have a defined set of possible severity
1082 levels, and this should be provided here.";
1083 }
1084 leaf description {
1085 type string;
1086 mandatory true;
1087 description
1088 "A description of the possible alarm. It SHOULD include
1089 information on possible underlying root causes and
1090 corrective actions.";
1091 }
1092 }
1093 }
1094 container summary {
1095 if-feature "alarm-summary";
1096 config false;
1097 description
1098 "This container gives a summary of the number of alarms.";
1099 list alarm-summary {
1100 key "severity";
1101 description
1102 "A global summary of all alarms in the system. The summary
1103 does not include shelved alarms.";
1104 leaf severity {
1105 type severity;
1106 description
1107 "Alarm summary for this severity level.";
1108 }
1109 leaf total {
1110 type yang:gauge32;
1111 description
1112 "Total number of alarms of this severity level.";
1113 }
1114 leaf not-cleared {
1115 type yang:gauge32;
1116 description
1117 "Total number of alarms of this severity level
1118 that are not cleared.";
1119 }
1120 leaf cleared {
1121 type yang:gauge32;
1122 description
1123 "For this severity level, the number of alarms that are
1124 cleared.";
1125 }
1126 leaf cleared-not-closed {
1127 if-feature "operator-actions";
1128 type yang:gauge32;
1129 description
1130 "For this severity level, the number of alarms that are
1131 cleared but not closed.";
1132 }
1133 leaf cleared-closed {
1134 if-feature "operator-actions";
1135 type yang:gauge32;
1136 description
1137 "For this severity level, the number of alarms that are
1138 cleared and closed.";
1139 }
1140 leaf not-cleared-closed {
1141 if-feature "operator-actions";
1142 type yang:gauge32;
1143 description
1144 "For this severity level, the number of alarms that are
1145 not cleared but closed.";
1146 }
1147 leaf not-cleared-not-closed {
1148 if-feature "operator-actions";
1149 type yang:gauge32;
1150 description
1151 "For this severity level, the number of alarms that are
1152 not cleared and not closed.";
1153 }
1154 }
1155 leaf shelves-active {
1156 if-feature "alarm-shelving";
1157 type empty;
1158 description
1159 "This is a hint to the operator that there are active
1160 alarm shelves. This leaf MUST exist if the
1161 /alarms/shelved-alarms/number-of-shelved-alarms is > 0.";
1162 }
1163 }
1164 container alarm-list {
1165 config false;
1166 description
1167 "The alarms in the system.";
1168 leaf number-of-alarms {
1169 type yang:gauge32;
1170 description
1171 "This object shows the total number of
1172 alarms in the system, i.e., the total number
1173 of entries in the alarm list.";
1174 }
1175 leaf last-changed {
1176 type yang:date-and-time;
1177 description
1178 "A timestamp when the alarm list was last
1179 changed. The value can be used by a manager to
1180 initiate an alarm resynchronization procedure.";
1181 }
1182 list alarm {
1183 key "resource alarm-type-id alarm-type-qualifier";
1184 description
1185 "The list of alarms. Each entry in the list holds one
1186 alarm for a given alarm type and resource. An alarm can
1187 be updated from the underlying resource or by the user.
1188 The following leafs are maintained by the resource:
1189 'is-cleared', 'last-change', 'perceived-severity', and
1190 'alarm-text'. An operator can change 'operator-state' and
1191 'operator-text'.
1192
1193 Entries appear in the alarm list the first time an alarm
1194 becomes active for a given alarm type and resource.
1195 Entries do not get deleted when the alarm is cleared.
1196 Clear status is represented as a boolean flag.
1197
1198 Alarm entries are removed, i.e., purged, from the list by
1199 an explicit purge action. For example, purge all alarms
1200 that are cleared and in closed operator state that are
1201 older than 24 hours. Purged alarms are removed from the
1202 alarm list. If the alarm resource state changes after a
1203 purge, the alarm will reappear in the alarm list.
1204
1205 Systems may also remove alarms based on locally configured
1206 policies; this is out of scope for this module.";
1207 uses common-alarm-parameters;
1208 leaf time-created {
1209 type yang:date-and-time;
1210 mandatory true;
1211 description
1212 "The timestamp when this alarm entry was created. This
1213 represents the first time the alarm appeared; it can
1214 also represent that the alarm reappeared after a purge.
1215 Further state changes of the same alarm do not change
1216 this leaf; these changes will update the 'last-changed'
1217 leaf.";
1218 }
1219 uses resource-alarm-parameters;
1220 list operator-state-change {
1221 if-feature "operator-actions";
1222 key "time";
1223 description
1224 "This list is used by operators to indicate the state of
1225 human intervention on an alarm. For example, if an
1226 operator has seen an alarm, the operator can add a new
1227 item to this list indicating that the alarm is
1228 acknowledged.";
1229 uses operator-parameters;
1230 }
1231 action set-operator-state {
1232 if-feature "operator-actions";
1233 description
1234 "This is a means for the operator to indicate the level
1235 of human intervention on an alarm.";
1236 input {
1237 leaf state {
1238 type writable-operator-state;
1239 mandatory true;
1240 description
1241 "Set this operator state.";
1242 }
1243 leaf text {
1244 type string;
1245 description
1246 "Additional optional textual information.";
1247 }
1248 }
1249 }
1250 notification operator-action {
1251 if-feature "operator-actions";
1252 description
1253 "This notification is used to report that an operator
1254 acted upon an alarm.";
1255 uses operator-parameters;
1256 }
1257 }
1258 action purge-alarms {
1259 description
1260 "This operation requests that the server delete entries
1261 from the alarm list according to the supplied criteria.
1262
1263 Typically, this operation is used to delete alarms that
1264 are in closed operator state and older than a specified
1265 time.
1266
1267 The number of purged alarms is returned as an output
1268 parameter.";
1269 input {
1270 uses filter-input;
1271 }
1272 output {
1273 leaf purged-alarms {
1274 type uint32;
1275 description
1276 "Number of purged alarms.";
1277 }
1278 }
1279 }
1280 action compress-alarms {
1281 if-feature "alarm-history";
1282 description
1283 "This operation requests that the server compress
1284 entries in the alarm list by removing all but the
1285 latest 'status-change' entry for all matching alarms.
1286 Conditions in the input are logically ANDed. If no
1287 input condition is given, all alarms are compressed.";
1288 input {
1289 leaf resource {
1290 type resource-match;
1291 description
1292 "Compress the alarms matching this resource.";
1293 }
1294 leaf alarm-type-id {
1295 type leafref {
1296 path "/alarms/alarm-list/alarm/alarm-type-id";
1297 require-instance false;
1298 }
1299 description
1300 "Compress alarms with this 'alarm-type-id'.";
1301 }
1302 leaf alarm-type-qualifier {
1303 type leafref {
1304 path "/alarms/alarm-list/alarm/alarm-type-qualifier";
1305 require-instance false;
1306 }
1307 description
1308 "Compress the alarms with this
1309 'alarm-type-qualifier'.";
1310 }
1311 }
1312 output {
1313 leaf compressed-alarms {
1314 type uint32;
1315 description
1316 "Number of compressed alarm entries.";
1317 }
1318 }
1319 }
1320 }
1321 container shelved-alarms {
1322 if-feature "alarm-shelving";
1323 config false;
1324 description
1325 "The shelved alarms. Alarms appear here if they match the
1326 criteria in /alarms/control/alarm-shelving. This list does
1327 not generate any notifications. The list represents alarms
1328 that are considered not relevant by the operator. Alarms in
1329 this list have an 'operator-state' of 'shelved'. This
1330 cannot be changed.";
1331 leaf number-of-shelved-alarms {
1332 type yang:gauge32;
1333 description
1334 "This object shows the total number of current
1335 alarms, i.e., the total number of entries
1336 in the alarm list.";
1337 }
1338 leaf shelved-alarms-last-changed {
1339 type yang:date-and-time;
1340 description
1341 "A timestamp when the shelved-alarm list was last changed.
1342 The value can be used by a manager to initiate an alarm
1343 resynchronization procedure.";
1344 }
1345 list shelved-alarm {
1346 key "resource alarm-type-id alarm-type-qualifier";
1347 description
1348 "The list of shelved alarms. Shelved alarms can only be
1349 updated from the underlying resource; no operator actions
1350 are supported.";
1351 uses common-alarm-parameters;
1352 leaf shelf-name {
1353 type leafref {
1354 path "/alarms/control/alarm-shelving/shelf/name";
1355 require-instance false;
1356 }
1357 description
1358 "The name of the shelf.";
1359 }
1360 uses resource-alarm-parameters;
1361 list operator-state-change {
1362 if-feature "operator-actions";
1363 key "time";
1364 description
1365 "This list is used by operators to indicate the state of
1366 human intervention on an alarm. For shelved alarms, the
1367 system has set the list item in the list to 'shelved'.";
1368 uses operator-parameters;
1369 }
1370 }
1371 action purge-shelved-alarms {
1372 description
1373 "This operation requests that the server delete entries from
1374 the shelved-alarm list according to the supplied criteria.
1375 In the shelved-alarm list, it makes sense to delete alarms
1376 that are not relevant anymore.
1377
1378 The number of purged alarms is returned as an output
1379 parameter.";
1380 input {
1381 uses filter-input;
1382 }
1383 output {
1384 leaf purged-alarms {
1385 type uint32;
1386 description
1387 "Number of purged alarms.";
1388 }
1389 }
1390 }
1391 action compress-shelved-alarms {
1392 if-feature "alarm-history";
1393 description
1394 "This operation requests that the server compress entries
1395 in the shelved-alarm list by removing all but the latest
1396 'status-change' entry for all matching shelved alarms.
1397 Conditions in the input are logically ANDed. If no input
1398 condition is given, all alarms are compressed.";
1399 input {
1400 leaf resource {
1401 type leafref {
1402 path "/alarms/shelved-alarms/shelved-alarm/resource";
1403 require-instance false;
1404 }
1405 description
1406 "Compress the alarms with this resource.";
1407 }
1408 leaf alarm-type-id {
1409 type leafref {
1410 path "/alarms/shelved-alarms/shelved-alarm"
1411 + "/alarm-type-id";
1412 require-instance false;
1413 }
1414 description
1415 "Compress alarms with this 'alarm-type-id'.";
1416 }
1417 leaf alarm-type-qualifier {
1418 type leafref {
1419 path "/alarms/shelved-alarms/shelved-alarm"
1420 + "/alarm-type-qualifier";
1421 require-instance false;
1422 }
1423 description
1424 "Compress the alarms with this
1425 'alarm-type-qualifier'.";
1426 }
1427 }
1428 output {
1429 leaf compressed-alarms {
1430 type uint32;
1431 description
1432 "Number of compressed alarm entries.";
1433 }
1434 }
1435 }
1436 }
1437 list alarm-profile {
1438 if-feature "alarm-profile";
1439 key "alarm-type-id alarm-type-qualifier-match resource";
1440 ordered-by user;
1441 description
1442 "This list is used to assign further information or
1443 configuration for each alarm type. This module supports a
1444 mechanism where the client can override the system-default
1445 alarm severity levels. The 'alarm-profile' is also a useful
1446 augmentation point for specific additions to alarm types.";
1447 leaf alarm-type-id {
1448 type alarm-type-id;
1449 description
1450 "The alarm type identifier to match.";
1451 }
1452 leaf alarm-type-qualifier-match {
1453 type string;
1454 description
1455 "An XML Schema regular expression that is used to match the
1456 alarm type qualifier.";
1457 reference
1458 "XML Schema Part 2: Datatypes Second Edition,
1459 World Wide Web Consortium Recommendation
1460 REC-xmlschema-2-20041028";
1461 }
1462 leaf resource {
1463 type resource-match;
1464 description
1465 "Specifies which resources to match.";
1466 }
1467 leaf description {
1468 type string;
1469 mandatory true;
1470 description
1471 "A description of the alarm profile.";
1472 }
1473 container alarm-severity-assignment-profile {
1474 if-feature "severity-assignment";
1475 description
1476 "The client can override the system-default severity
1477 level.";
1478 reference
1479 "ITU-T Recommendation M.3100:
1480 Generic network information model
1481 ITU-T Recommendation M.3160:
1482 Generic, protocol-neutral management information model";
1483 leaf-list severity-level {
1484 type severity;
1485 ordered-by user;
1486 description
1487 "Specifies the configured severity level(s) for the
1488 matching alarm. If the alarm has several severity
1489 levels, the leaf-list shall be given in rising severity
1490 order. The original M3100/M3160 ASAP function only
1491 allows for a one-to-one mapping between alarm type and
1492 severity, but since YANG module supports stateful
1493 alarms, the mapping must allow for several severity
1494 levels.
1495
1496 Assume a high-utilization alarm type with two thresholds
1497 with the system-default severity levels of threshold1 =
1498 warning and threshold2 = minor. Setting this leaf-list
1499 to (minor, major) will assign the severity levels as
1500 threshold1 = minor and threshold2 = major";
1501 }
1502 }
1503 }
1504 }
1505
1506 /*
1507 * Notifications
1508 */
1509
1510 notification alarm-notification {
1511 description
1512 "This notification is used to report a state change for an
1513 alarm. The same notification is used for reporting a newly
1514 raised alarm, a cleared alarm, or changing the text and/or
1515 severity of an existing alarm.";
1516 uses common-alarm-parameters;
1517 uses alarm-state-change-parameters;
1518 }
1519
1520 notification alarm-inventory-changed {
1521 description
1522 "This notification is used to report that the list of possible
1523 alarms has changed. This can happen when, for example, a new
1524 software module is installed or a new physical card is
1525 inserted.";
1526 }
1527}