draft-ietf-netmod-syslog-model-19.txt | draft-ietf-netmod-syslog-model-20.txt | |||
---|---|---|---|---|
NETMOD WG C. Wildes, Ed. | NETMOD WG C. Wildes, Ed. | |||
Internet-Draft Cisco Systems Inc. | Internet-Draft Cisco Systems Inc. | |||
Intended status: Standards Track K. Koushik, Ed. | Intended status: Standards Track K. Koushik, Ed. | |||
Expires: July 16, 2018 Verizon Wireless | Expires: August 13, 2018 Verizon Wireless | |||
January 12, 2018 | February 09, 2018 | |||
A YANG Data Model for Syslog Configuration | A YANG Data Model for Syslog Configuration | |||
draft-ietf-netmod-syslog-model-19 | draft-ietf-netmod-syslog-model-20 | |||
Abstract | Abstract | |||
This document defines a YANG data model for the configuration of a | This document defines a YANG data model for the configuration of a | |||
syslog process. It is intended this model be used by vendors who | syslog process. It is intended this model be used by vendors who | |||
implement syslog in their systems. | implement syslog in their systems. | |||
Editorial Note (To be removed by RFC Editor) | Editorial Note (To be removed by RFC Editor) | |||
This draft contains many placeholder values that need to be replaced | This draft contains many placeholder values that need to be replaced | |||
skipping to change at page 2, line 10 ¶ | skipping to change at page 2, line 10 ¶ | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
This Internet-Draft will expire on July 16, 2018. | This Internet-Draft will expire on August 13, 2018. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2018 IETF Trust and the persons identified as the | Copyright (c) 2018 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
(https://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
publication of this document. Please review these documents | publication of this document. Please review these documents | |||
skipping to change at page 2, line 32 ¶ | skipping to change at page 2, line 32 ¶ | |||
to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
described in the Simplified BSD License. | described in the Simplified BSD License. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 | 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 | |||
1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 | 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
1.3. Tree Diagram Notation . . . . . . . . . . . . . . . . . . 4 | ||||
2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4 | 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4 | |||
3. Design of the Syslog Model . . . . . . . . . . . . . . . . . 5 | 3. Design of the Syslog Model . . . . . . . . . . . . . . . . . 4 | |||
3.1. Syslog Module . . . . . . . . . . . . . . . . . . . . . . 6 | 3.1. Syslog Module . . . . . . . . . . . . . . . . . . . . . . 6 | |||
4. Syslog YANG Module . . . . . . . . . . . . . . . . . . . . . 9 | 4. Syslog YANG Module . . . . . . . . . . . . . . . . . . . . . 8 | |||
4.1. The ietf-syslog Module . . . . . . . . . . . . . . . . . 9 | 4.1. The ietf-syslog Module . . . . . . . . . . . . . . . . . 8 | |||
5. Usage Examples . . . . . . . . . . . . . . . . . . . . . . . 27 | 5. Usage Examples . . . . . . . . . . . . . . . . . . . . . . . 27 | |||
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 28 | 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 27 | |||
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 | 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28 | |||
7.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 29 | 7.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 28 | |||
7.2. The YANG Module Names Registry . . . . . . . . . . . . . 29 | 7.2. The YANG Module Names Registry . . . . . . . . . . . . . 28 | |||
8. Security Considerations . . . . . . . . . . . . . . . . . . . 29 | 8. Security Considerations . . . . . . . . . . . . . . . . . . . 28 | |||
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 30 | 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 29 | |||
9.1. Normative References . . . . . . . . . . . . . . . . . . 30 | 9.1. Normative References . . . . . . . . . . . . . . . . . . 29 | |||
9.2. Informative References . . . . . . . . . . . . . . . . . 31 | 9.2. Informative References . . . . . . . . . . . . . . . . . 30 | |||
Appendix A. Implementor Guidelines . . . . . . . . . . . . . . . 33 | Appendix A. Implementor Guidelines . . . . . . . . . . . . . . . 32 | |||
A.1. Extending Facilities . . . . . . . . . . . . . . . . . . 33 | A.1. Extending Facilities . . . . . . . . . . . . . . . . . . 32 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 34 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33 | |||
1. Introduction | 1. Introduction | |||
Operating systems, processes and applications generate messages | Operating systems, processes and applications generate messages | |||
indicating their own status or the occurrence of events. These | indicating their own status or the occurrence of events. These | |||
messages are useful for managing and/or debugging the network and its | messages are useful for managing and/or debugging the network and its | |||
services. The BSD syslog protocol is a widely adopted protocol that | services. The BSD syslog protocol is a widely adopted protocol that | |||
is used for transmission and processing of the message. | is used for transmission and processing of the message. | |||
Since each process, application and operating system was written | Since each process, application and operating system was written | |||
skipping to change at page 4, line 5 ¶ | skipping to change at page 4, line 5 ¶ | |||
The term "relay" is defined in [RFC5424]: a "relay" forwards | The term "relay" is defined in [RFC5424]: a "relay" forwards | |||
messages, accepting messages from originators or other relays and | messages, accepting messages from originators or other relays and | |||
sending them to collectors or other relays | sending them to collectors or other relays | |||
The term "collectors" is defined in [RFC5424]: a "collector" gathers | The term "collectors" is defined in [RFC5424]: a "collector" gathers | |||
syslog content for further analysis. | syslog content for further analysis. | |||
The term "action" refers to the processing that takes place for each | The term "action" refers to the processing that takes place for each | |||
syslog message received. | syslog message received. | |||
1.3. Tree Diagram Notation | ||||
A simplified graphical representation of the data models is used in | ||||
this document. The meaning of the symbols in these diagrams is as | ||||
follows: | ||||
o Brackets "[" and "]" enclose list keys. | ||||
o Braces "{" and "}" enclose feature names, and indicate that the | ||||
named feature must be present for the subtree to be present. | ||||
o Abbreviations before data node names: "rw" means configuration | ||||
(read-write) and "ro" state data (read-only). | ||||
o Symbols after data node names: "?" means an optional node, "!" | ||||
means a presence container, and "*" denotes a list and leaf-list. | ||||
o Parentheses enclose choice and case nodes, and case nodes are also | ||||
marked with a colon (":"). | ||||
o Ellipsis ("...") stands for contents of subtrees that are not | ||||
shown. | ||||
2. Problem Statement | 2. Problem Statement | |||
This document defines a YANG [RFC7950] configuration data model that | This document defines a YANG [RFC7950] configuration data model that | |||
may be used to configure the syslog feature running on a system. | may be used to configure the syslog feature running on a system. | |||
YANG models can be used with network management protocols such as | YANG models can be used with network management protocols such as | |||
NETCONF [RFC6241] to install, manipulate, and delete the | NETCONF [RFC6241] to install, manipulate, and delete the | |||
configuration of network devices. | configuration of network devices. | |||
The data model makes use of the YANG "feature" construct which allows | The data model makes use of the YANG "feature" construct which allows | |||
implementations to support only those syslog features that lie within | implementations to support only those syslog features that lie within | |||
skipping to change at page 6, line 44 ¶ | skipping to change at page 6, line 31 ¶ | |||
select messages of the specified severity and higher. Actions are | select messages of the specified severity and higher. Actions are | |||
used to log the message or block the message from being logged. | used to log the message or block the message from being logged. | |||
Many vendors extend the list of facilities available for logging in | Many vendors extend the list of facilities available for logging in | |||
their implementation. An example is included in Extending Facilities | their implementation. An example is included in Extending Facilities | |||
(Appendix A.1). | (Appendix A.1). | |||
3.1. Syslog Module | 3.1. Syslog Module | |||
A simplified graphical representation of the data model is used in | A simplified graphical representation of the data model is used in | |||
this document. Please see Section 1.3 for tree diagram notation. | this document. Please see [I-D.ietf-netmod-yang-tree-diagrams] for | |||
tree diagram notation. | ||||
module: ietf-syslog | module: ietf-syslog | |||
+--rw syslog! | +--rw syslog! | |||
+--rw actions | +--rw actions | |||
+--rw console! {console-action}? | +--rw console! {console-action}? | |||
| +--rw facility-filter | | +--rw facility-filter | |||
| | +--rw facility-list* [facility severity] | | | +--rw facility-list* [facility severity] | |||
| | +--rw facility union | | | +--rw facility union | |||
| | +--rw severity union | | | +--rw severity union | |||
| | +--rw advanced-compare {select-adv-compare}? | | | +--rw advanced-compare {select-adv-compare}? | |||
| | +--rw compare? enumeration | | | +--rw compare? enumeration | |||
| | +--rw action? enumeration | | | +--rw action? enumeration | |||
skipping to change at page 7, line 32 ¶ | skipping to change at page 7, line 20 ¶ | |||
| +--rw number-of-files? uint32 {file-limit-size}? | | +--rw number-of-files? uint32 {file-limit-size}? | |||
| +--rw max-file-size? uint32 {file-limit-size}? | | +--rw max-file-size? uint32 {file-limit-size}? | |||
| +--rw rollover? uint32 | | +--rw rollover? uint32 | |||
| | {file-limit-duration}? | | | {file-limit-duration}? | |||
| +--rw retention? uint32 | | +--rw retention? uint32 | |||
| {file-limit-duration}? | | {file-limit-duration}? | |||
+--rw remote {remote-action}? | +--rw remote {remote-action}? | |||
+--rw destination* [name] | +--rw destination* [name] | |||
+--rw name string | +--rw name string | |||
+--rw (transport) | +--rw (transport) | |||
| +--:(tcp) | ||||
| | +--rw tcp | ||||
| | +--rw address? inet:host | ||||
| | +--rw port? inet:port-number | ||||
| +--:(udp) | | +--:(udp) | |||
| | +--rw udp | | | +--rw udp | |||
| | +--rw address? inet:host | | | +--rw address? inet:host | |||
| | +--rw port? inet:port-number | | | +--rw port? inet:port-number | |||
| +--:(tls) | | +--:(tls) | |||
| +--rw tls | | +--rw tls | |||
| +--rw address? inet:host | | +--rw address? inet:host | |||
| +--rw port? inet:port-number | | +--rw port? inet:port-number | |||
| +--rw client-auth | | +--rw client-auth | |||
| | +--rw (auth-type)? | | | +--rw (auth-type)? | |||
skipping to change at page 8, line 21 ¶ | skipping to change at page 8, line 5 ¶ | |||
| +--rw facility union | | +--rw facility union | |||
| +--rw severity union | | +--rw severity union | |||
| +--rw advanced-compare {select-adv-compare}? | | +--rw advanced-compare {select-adv-compare}? | |||
| +--rw compare? enumeration | | +--rw compare? enumeration | |||
| +--rw action? enumeration | | +--rw action? enumeration | |||
+--rw pattern-match? string {select-match}? | +--rw pattern-match? string {select-match}? | |||
+--rw structured-data? boolean {structured-data}? | +--rw structured-data? boolean {structured-data}? | |||
+--rw facility-override? identityref | +--rw facility-override? identityref | |||
+--rw source-interface? if:interface-ref | +--rw source-interface? if:interface-ref | |||
| {remote-source-interface}? | | {remote-source-interface}? | |||
+--rw signing-options! {signed-messages}? | +--rw signing! {signed-messages}? | |||
+--rw cert-signers | +--rw cert-signers | |||
+--rw cert-signer* [name] | +--rw cert-signer* [name] | |||
| +--rw name string | | +--rw name string | |||
| +--rw cert | | +--rw cert | |||
| | +--rw algorithm? | | | +--rw algorithm? | |||
| | | identityref | | | | identityref | |||
| | +--rw private-key? | | | +--rw private-key? | |||
| | | union | | | | union | |||
| | +--rw public-key? | | | +--rw public-key? | |||
| | | binary | | | | binary | |||
| | +---x generate-private-key | | | +---x generate-private-key | |||
| | | +---w input | | | | +---w input | |||
| | | +---w algorithm identityref | | | | +---w algorithm? | |||
| | | identityref | ||||
| | +--rw certificates | | | +--rw certificates | |||
| | | +--rw certificate* [name] | | | | +--rw certificate* [name] | |||
| | | +--rw name string | | | | +--rw name string | |||
| | | +--rw value? binary | | | | +--rw value? binary | |||
| | +---x generate-certificate-signing-request | | | +---x generate-certificate-signing-request | |||
| | +---w input | | | +---w input | |||
| | | +---w subject binary | | | | +---w subject binary | |||
| | | +---w attributes? binary | | | | +---w attributes? binary | |||
| | +--ro output | | | +--ro output | |||
| | +--ro certificate-signing-request | | | +--ro certificate-signing-request | |||
skipping to change at page 9, line 15 ¶ | skipping to change at page 8, line 48 ¶ | |||
+--rw sig-resend-count? uint32 | +--rw sig-resend-count? uint32 | |||
Figure 2. ietf-syslog Module Tree | Figure 2. ietf-syslog Module Tree | |||
4. Syslog YANG Module | 4. Syslog YANG Module | |||
4.1. The ietf-syslog Module | 4.1. The ietf-syslog Module | |||
This module imports typedefs from [RFC7223], groupings from [I- | This module imports typedefs from [RFC7223], groupings from [I- | |||
D.ietf-netconf-keystore], and [I-D.ietf-netconf-tls-client-server], | D.ietf-netconf-keystore], and [I-D.ietf-netconf-tls-client-server], | |||
and it references [RFC5424], [RFC5425], [RFC5426], [RFC6587], and | and it references [RFC5424], [RFC5425], [RFC5426], and [RFC5848] and | |||
[RFC5848] and [Std-1003.1-2008]. | [Std-1003.1-2008]. | |||
<CODE BEGINS> file "ietf-syslog@2018-01-12.yang" | <CODE BEGINS> file "ietf-syslog@2018-02-09.yang" | |||
module ietf-syslog { | module ietf-syslog { | |||
yang-version 1.1; | yang-version 1.1; | |||
namespace "urn:ietf:params:xml:ns:yang:ietf-syslog"; | namespace "urn:ietf:params:xml:ns:yang:ietf-syslog"; | |||
prefix syslog; | prefix syslog; | |||
import ietf-inet-types { | import ietf-inet-types { | |||
prefix inet; | prefix inet; | |||
reference | reference | |||
"RFC 6991: INET Types Model"; | "RFC 6991: INET Types Model"; | |||
} | } | |||
import ietf-interfaces { | import ietf-interfaces { | |||
prefix if; | prefix if; | |||
reference | reference | |||
"RFC 7223: Interfaces Model"; | "RFC 7223: Interfaces Model"; | |||
} | } | |||
import ietf-tls-client { | import ietf-tls-client { | |||
prefix tlsc; | prefix tlsc; | |||
reference | reference | |||
"I-D.ietf-netconf-tls-client-server: TLS Client and Server Models"; | "I-D.ietf-netconf-tls-client-server: | |||
} | TLS Client and Server Models"; | |||
} | ||||
import ietf-keystore { | import ietf-keystore { | |||
prefix ks; | prefix ks; | |||
reference | reference | |||
"I-D.ietf-netconf-keystore: Keystore Model"; | "I-D.ietf-netconf-keystore: Keystore Model"; | |||
} | } | |||
organization | organization | |||
"IETF NETMOD (Network Modeling) Working Group"; | "IETF NETMOD (Network Modeling) Working Group"; | |||
contact | contact | |||
"WG Web: <http://tools.ietf.org/wg/netmod/> | "WG Web: <http://tools.ietf.org/wg/netmod/> | |||
WG List: <mailto:netmod@ietf.org> | WG List: <mailto:netmod@ietf.org> | |||
Editor: Kiran Agrahara Sreenivasa | Editor: Kiran Agrahara Sreenivasa | |||
<mailto:kirankoushik.agraharasreenivasa@ | <mailto:kirankoushik.agraharasreenivasa@ | |||
verizonwireless.com> | verizonwireless.com> | |||
Editor: Clyde Wildes | Editor: Clyde Wildes | |||
<mailto:cwildes@cisco.com>"; | <mailto:cwildes@cisco.com>"; | |||
description | description | |||
"This module contains a collection of YANG definitions | "This module contains a collection of YANG definitions | |||
for syslog configuration. | for syslog configuration. | |||
Copyright (c) 2018 IETF Trust and the persons identified as | Copyright (c) 2018 IETF Trust and the persons identified as | |||
authors of the code. All rights reserved. | authors of the code. All rights reserved. | |||
Redistribution and use in source and binary forms, with or | Redistribution and use in source and binary forms, with or | |||
without modification, is permitted pursuant to, and subject to | without modification, is permitted pursuant to, and subject to | |||
the license terms contained in, the Simplified BSD License set | the license terms contained in, the Simplified BSD License set | |||
forth in Section 4.c of the IETF Trust's Legal Provisions | forth in Section 4.c of the IETF Trust's Legal Provisions | |||
Relating to IETF Documents | Relating to IETF Documents | |||
(http://trustee.ietf.org/license-info). | (http://trustee.ietf.org/license-info). | |||
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL | The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL | |||
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and | NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and | |||
'OPTIONAL' in the module text are to be interpreted as | 'OPTIONAL' in the module text are to be interpreted as | |||
described in RFC 2119 (http://tools.ietf.org/html/rfc2119). | described in RFC 2119 (http://tools.ietf.org/html/rfc2119). | |||
This version of this YANG module is part of RFC zzzz | This version of this YANG module is part of RFC zzzz | |||
(http://tools.ietf.org/html/rfczzzz); see the RFC itself for | (http://tools.ietf.org/html/rfczzzz); see the RFC itself for | |||
full legal notices."; | full legal notices."; | |||
revision 2018-01-12 { | revision 2018-02-09 { | |||
description | description | |||
"Initial Revision"; | "Initial Revision"; | |||
reference | reference | |||
"RFC zzzz: Syslog YANG Model"; | "RFC zzzz: Syslog YANG Model"; | |||
} | } | |||
feature console-action { | feature console-action { | |||
description | description | |||
"This feature indicates that the local console action is | "This feature indicates that the local console action is | |||
supported."; | supported."; | |||
} | } | |||
feature file-action { | feature file-action { | |||
description | description | |||
"This feature indicates that the local file action is | "This feature indicates that the local file action is | |||
supported."; | supported."; | |||
} | } | |||
feature file-limit-size { | feature file-limit-size { | |||
description | description | |||
"This feature indicates that file logging resources | "This feature indicates that file logging resources | |||
are managed using size and number limits."; | are managed using size and number limits."; | |||
} | } | |||
feature file-limit-duration { | feature file-limit-duration { | |||
description | description | |||
"This feature indicates that file logging resources | "This feature indicates that file logging resources | |||
are managed using time based limits."; | are managed using time based limits."; | |||
} | ||||
feature remote-action { | } | |||
description | ||||
"This feature indicates that the remote server action is | ||||
supported."; | ||||
} | ||||
feature remote-source-interface { | feature remote-action { | |||
description | description | |||
"This feature indicates that source-interface is supported | "This feature indicates that the remote server action is | |||
supported for the remote-action."; | supported."; | |||
} | } | |||
feature select-adv-compare { | feature remote-source-interface { | |||
description | description | |||
"This feature represents the ability to select messages | "This feature indicates that source-interface is supported | |||
using the additional comparison operators when comparing | supported for the remote-action."; | |||
the syslog message severity."; | } | |||
} | ||||
feature select-match { | feature select-adv-compare { | |||
description | description | |||
"This feature represents the ability to select messages | "This feature represents the ability to select messages | |||
based on a Posix 1003.2 regular expression pattern match."; | using the additional comparison operators when comparing | |||
} | the syslog message severity."; | |||
} | ||||
feature structured-data { | feature select-match { | |||
description | description | |||
"This feature represents the ability to log messages | "This feature represents the ability to select messages | |||
in structured-data format."; | based on a Posix 1003.2 regular expression pattern match."; | |||
reference | } | |||
"RFC 5424: The Syslog Protocol"; | ||||
} | ||||
feature signed-messages { | ||||
description | ||||
"This feature represents the ability to configure signed | ||||
syslog messages."; | ||||
reference | ||||
"RFC 5848: Signed Syslog Messages"; | ||||
} | ||||
typedef syslog-severity { | feature structured-data { | |||
type enumeration { | description | |||
enum "emergency" { | "This feature represents the ability to log messages | |||
value 0; | in structured-data format."; | |||
description | reference | |||
"The severity level 'Emergency' indicating that the | "RFC 5424: The Syslog Protocol"; | |||
system is unusable."; | } | |||
} | ||||
enum "alert" { | ||||
value 1; | ||||
description | ||||
"The severity level 'Alert' indicating that an action | ||||
must be taken immediately."; | ||||
} | ||||
enum "critical" { | ||||
value 2; | ||||
description | ||||
"The severity level 'Critical' indicating a critical | ||||
condition."; | ||||
} | ||||
enum "error" { | ||||
value 3; | ||||
description | ||||
"The severity level 'Error' indicating an error | ||||
condition."; | ||||
} | ||||
enum "warning" { | ||||
value 4; | ||||
description | ||||
"The severity level 'Warning' indicating a warning | ||||
condition."; | ||||
} | ||||
enum "notice" { | ||||
value 5; | ||||
description | ||||
"The severity level 'Notice' indicating a normal but | ||||
significant condition."; | ||||
} | ||||
enum "info" { | ||||
value 6; | ||||
description | ||||
"The severity level 'Info' indicating an informational | ||||
message."; | ||||
} | ||||
enum "debug" { | ||||
value 7; | ||||
description | ||||
"The severity level 'Debug' indicating a debug-level | ||||
message."; | ||||
} | ||||
} | ||||
description | ||||
"The definitions for Syslog message severity."; | ||||
reference | ||||
"RFC 5424: The Syslog Protocol"; | ||||
} | ||||
identity syslog-facility { | feature signed-messages { | |||
description | description | |||
"This identity is used as a base for all syslog facilities."; | "This feature represents the ability to configure signed | |||
reference | syslog messages."; | |||
"RFC 5424: The Syslog Protocol"; | reference | |||
} | "RFC 5848: Signed Syslog Messages"; | |||
} | ||||
identity kern { | typedef syslog-severity { | |||
base syslog-facility; | type enumeration { | |||
description | enum "emergency" { | |||
"The facility for kernel messages (0)."; | value 0; | |||
reference | description | |||
"RFC 5424: The Syslog Protocol"; | "The severity level 'Emergency' indicating that the | |||
} | system is unusable."; | |||
} | ||||
enum "alert" { | ||||
value 1; | ||||
description | ||||
"The severity level 'Alert' indicating that an action | ||||
must be taken immediately."; | ||||
} | ||||
enum "critical" { | ||||
value 2; | ||||
description | ||||
"The severity level 'Critical' indicating a critical | ||||
condition."; | ||||
} | ||||
enum "error" { | ||||
value 3; | ||||
description | ||||
"The severity level 'Error' indicating an error | ||||
condition."; | ||||
} | ||||
enum "warning" { | ||||
value 4; | ||||
description | ||||
"The severity level 'Warning' indicating a warning | ||||
condition."; | ||||
} | ||||
enum "notice" { | ||||
value 5; | ||||
description | ||||
"The severity level 'Notice' indicating a normal but | ||||
significant condition."; | ||||
} | ||||
enum "info" { | ||||
value 6; | ||||
description | ||||
"The severity level 'Info' indicating an informational | ||||
message."; | ||||
} | ||||
enum "debug" { | ||||
value 7; | ||||
description | ||||
"The severity level 'Debug' indicating a debug-level | ||||
message."; | ||||
} | ||||
} | ||||
description | ||||
"The definitions for Syslog message severity."; | ||||
identity user { | reference | |||
base syslog-facility; | "RFC 5424: The Syslog Protocol"; | |||
description | } | |||
"The facility for user-level messages (1)."; | ||||
reference | ||||
"RFC 5424: The Syslog Protocol"; | ||||
} | ||||
identity mail { | identity syslog-facility { | |||
base syslog-facility; | description | |||
description | "This identity is used as a base for all syslog facilities."; | |||
"The facility for the mail system (2)."; | reference | |||
reference | "RFC 5424: The Syslog Protocol"; | |||
"RFC 5424: The Syslog Protocol"; | } | |||
} | ||||
identity daemon { | ||||
base syslog-facility; | ||||
description | ||||
"The facility for the system daemons (3)."; | ||||
reference | ||||
"RFC 5424: The Syslog Protocol"; | ||||
} | ||||
identity auth { | identity kern { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for security/authorization messages (4)."; | "The facility for kernel messages (0)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity syslog { | identity user { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for messages generated internally by syslogd | "The facility for user-level messages (1)."; | |||
facility (5)."; | reference | |||
reference | "RFC 5424: The Syslog Protocol"; | |||
"RFC 5424: The Syslog Protocol"; | } | |||
} | ||||
identity lpr { | identity mail { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for the line printer subsystem (6)."; | "The facility for the mail system (2)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity news { | identity daemon { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for the network news subsystem (7)."; | "The facility for the system daemons (3)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity uucp { | identity auth { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for the UUCP subsystem (8)."; | "The facility for security/authorization messages (4)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity cron { | ||||
base syslog-facility; | ||||
description | ||||
"The facility for the clock daemon (9)."; | ||||
reference | ||||
"RFC 5424: The Syslog Protocol"; | ||||
} | ||||
identity authpriv { | identity syslog { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for privileged security/authorization messages | "The facility for messages generated internally by syslogd | |||
(10)."; | facility (5)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity ftp { | identity lpr { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for the FTP daemon (11)."; | "The facility for the line printer subsystem (6)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity ntp { | identity news { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for the NTP subsystem (12)."; | "The facility for the network news subsystem (7)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity audit { | identity uucp { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for log audit messages (13)."; | "The facility for the UUCP subsystem (8)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity console { | identity cron { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for log alert messages (14)."; | "The facility for the clock daemon (9)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity cron2 { | ||||
base syslog-facility; | ||||
description | ||||
"The facility for the second clock daemon (15)."; | ||||
reference | ||||
"RFC 5424: The Syslog Protocol"; | ||||
} | ||||
identity local0 { | identity authpriv { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for local use 0 messages (16)."; | "The facility for privileged security/authorization messages | |||
reference | (10)."; | |||
"RFC 5424: The Syslog Protocol"; | reference | |||
} | "RFC 5424: The Syslog Protocol"; | |||
} | ||||
identity local1 { | identity ftp { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for local use 1 messages (17)."; | "The facility for the FTP daemon (11)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity local2 { | identity ntp { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for local use 2 messages (18)."; | "The facility for the NTP subsystem (12)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity local3 { | identity audit { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for local use 3 messages (19)."; | "The facility for log audit messages (13)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity local4 { | identity console { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for local use 4 messages (20)."; | "The facility for log alert messages (14)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity local5 { | ||||
base syslog-facility; | ||||
description | ||||
"The facility for local use 5 messages (21)."; | ||||
reference | ||||
"RFC 5424: The Syslog Protocol"; | ||||
} | ||||
identity local6 { | identity cron2 { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for local use 6 messages (22)."; | "The facility for the second clock daemon (15)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
identity local7 { | identity local0 { | |||
base syslog-facility; | base syslog-facility; | |||
description | description | |||
"The facility for local use 7 messages (23)."; | "The facility for local use 0 messages (16)."; | |||
reference | reference | |||
"RFC 5424: The Syslog Protocol"; | "RFC 5424: The Syslog Protocol"; | |||
} | } | |||
grouping severity-filter { | identity local1 { | |||
description | base syslog-facility; | |||
"This grouping defines the processing used to select | description | |||
log messages by comparing syslog message severity using | "The facility for local use 1 messages (17)."; | |||
the following processing rules: | reference | |||
- if 'none', do not match. | "RFC 5424: The Syslog Protocol"; | |||
- if 'all', match. | } | |||
- else compare message severity with the specified severity | ||||
according to the default compare rule (all messages of the | ||||
specified severity and greater match) or if the | ||||
select-adv-compare feature is present, the advance-compare | ||||
rule."; | ||||
leaf severity { | ||||
type union { | ||||
type syslog-severity; | ||||
type enumeration { | ||||
enum none { | ||||
value 2147483647; | ||||
description | ||||
"This enum describes the case where no severities | ||||
are selected."; | ||||
} | ||||
enum all { | ||||
value -2147483648; | ||||
description | ||||
"This enum describes the case where all severities | ||||
are selected."; | ||||
} | ||||
} | ||||
} | ||||
mandatory true; | ||||
description | ||||
"This leaf specifies the syslog message severity."; | ||||
} | ||||
container advanced-compare { | ||||
when '../severity != "all" and | ||||
../severity != "none"' { | ||||
description | ||||
"The advanced compare container is not applicable for | ||||
severity 'all' or severity 'none'"; | ||||
} | ||||
if-feature select-adv-compare; | ||||
leaf compare { | ||||
type enumeration { | ||||
enum equals { | ||||
description | ||||
"This enum specifies that the severity comparison | ||||
operation will be equals."; | ||||
} | ||||
enum equals-or-higher { | ||||
description | ||||
"This enum specifies that the severity comparison | ||||
operation will be equals or higher."; | ||||
} | ||||
} | ||||
default equals-or-higher; | ||||
description | ||||
"The compare can be used to specify the comparison | ||||
operator that should be used to compare the syslog message | ||||
severity with the specified severity."; | ||||
} | ||||
leaf action { | ||||
type enumeration { | ||||
enum log { | ||||
description | ||||
"This enum specifies that if the compare operation is | ||||
true the message will be logged."; | ||||
} | ||||
enum block { | ||||
description | ||||
"This enum specifies that if the compare operation is | ||||
true the message will not be logged."; | ||||
} | identity local2 { | |||
} | base syslog-facility; | |||
default log; | description | |||
description | "The facility for local use 2 messages (18)."; | |||
"The action can be used to spectify if the message should | reference | |||
be logged or blocked based on the outcome of the compare | "RFC 5424: The Syslog Protocol"; | |||
operation."; | } | |||
} | ||||
description | ||||
"This container describes additional severity compare | ||||
operations that can be used in place of the default | ||||
severity comparison. The compare leaf specifies the type of | ||||
the compare that is done and the action leaf specifies the | ||||
intended result. | ||||
Example: compare->equals and action->no-match means | ||||
messages that have a severity that is not equal to the | ||||
specified severity will be logged."; | ||||
} | ||||
} | ||||
grouping selector { | identity local3 { | |||
description | base syslog-facility; | |||
"This grouping defines a syslog selector which is used to | description | |||
select log messages for the log-actions (console, file, | "The facility for local use 3 messages (19)."; | |||
remote, etc.). Choose one or both of the following: | reference | |||
facility [<facility> <severity>...] | "RFC 5424: The Syslog Protocol"; | |||
pattern-match regular-expression-match-string | } | |||
If both facility and pattern-match are specified, both must | ||||
match in order for a log message to be selected."; | ||||
container facility-filter { | ||||
description | ||||
"This container describes the syslog filter parameters."; | ||||
list facility-list { | ||||
key "facility severity"; | ||||
ordered-by user; | ||||
description | ||||
"This list describes a collection of syslog | ||||
facilities and severities."; | ||||
leaf facility { | ||||
type union { | ||||
type identityref { | ||||
base syslog-facility; | ||||
} | ||||
type enumeration { | ||||
enum all { | ||||
description | ||||
"This enum describes the case where all | ||||
facilities are requested."; | ||||
} | identity local4 { | |||
} | base syslog-facility; | |||
} | description | |||
description | "The facility for local use 4 messages (20)."; | |||
"The leaf uniquely identifies a syslog facility."; | reference | |||
} | "RFC 5424: The Syslog Protocol"; | |||
uses severity-filter; | } | |||
} | ||||
} | ||||
leaf pattern-match { | ||||
if-feature select-match; | ||||
type string; | ||||
description | ||||
"This leaf describes a Posix 1003.2 regular expression | ||||
string that can be used to select a syslog message for | ||||
logging. The match is performed on the SYSLOG-MSG field."; | ||||
reference | ||||
"RFC 5424: The Syslog Protocol | ||||
Std-1003.1-2008 Regular Expressions"; | ||||
} | ||||
} | ||||
grouping structured-data { | identity local5 { | |||
description | base syslog-facility; | |||
"This grouping defines the syslog structured data option | description | |||
which is used to select the format used to write log | "The facility for local use 5 messages (21)."; | |||
messages."; | reference | |||
leaf structured-data { | "RFC 5424: The Syslog Protocol"; | |||
if-feature structured-data; | } | |||
type boolean; | ||||
default false; | ||||
description | ||||
"This leaf describes how log messages are written. | ||||
If true, messages will be written with one or more | ||||
STRUCTURED-DATA elements; if false, messages will be | ||||
written with STRUCTURED-DATA = NILVALUE."; | ||||
reference | ||||
"RFC 5424: The Syslog Protocol"; | ||||
} | ||||
} | ||||
container syslog { | identity local6 { | |||
presence "Enables logging."; | base syslog-facility; | |||
description | description | |||
"This container describes the configuration parameters for | "The facility for local use 6 messages (22)."; | |||
syslog."; | reference | |||
container actions { | "RFC 5424: The Syslog Protocol"; | |||
description | } | |||
"This container describes the log-action parameters | ||||
for syslog."; | ||||
container console { | ||||
if-feature console-action; | ||||
presence "Enables logging to the console"; | ||||
description | ||||
"This container describes the configuration parameters | ||||
for console logging."; | ||||
uses selector; | ||||
} | ||||
container file { | ||||
if-feature file-action; | ||||
description | ||||
"This container describes the configuration parameters for | ||||
file logging. If file-archive limits are not supplied, it | ||||
is assumed that the local implementation defined limits | ||||
will be used."; | ||||
list log-file { | ||||
key "name"; | ||||
description | ||||
"This list describes a collection of local logging | ||||
files."; | ||||
leaf name { | ||||
type inet:uri { | ||||
pattern 'file:.*'; | ||||
} | ||||
description | ||||
"This leaf specifies the name of the log file which | ||||
MUST use the uri scheme file:."; | ||||
} | ||||
uses selector; | ||||
uses structured-data; | ||||
container file-rotation { | ||||
description | ||||
"This container describes the configuration | ||||
parameters for log file rotation."; | ||||
leaf number-of-files { | ||||
if-feature file-limit-size; | ||||
type uint32; | ||||
default 1; | ||||
description | ||||
"This leaf specifies the maximum number of log | ||||
files retained. Specify 1 for implementations | ||||
that only support one log file."; | ||||
} | ||||
leaf max-file-size { | ||||
if-feature file-limit-size; | ||||
type uint32; | ||||
units "megabytes"; | ||||
description | ||||
"This leaf specifies the maximum log file size."; | ||||
} | ||||
leaf rollover { | ||||
if-feature file-limit-duration; | ||||
type uint32; | ||||
units "minutes"; | ||||
description | ||||
"This leaf specifies the length of time that log | ||||
events should be written to a specific log file. | ||||
Log events that arrive after the rollover period | ||||
cause the current log file to be closed and a new | ||||
log file to be opened."; | ||||
} | ||||
leaf retention { | ||||
if-feature file-limit-duration; | ||||
type uint32; | ||||
units "hours"; | ||||
description | ||||
"This leaf specifies the length of time that | ||||
completed/closed log event files should be stored | ||||
in the file system before they are deleted."; | ||||
} | ||||
} | ||||
} | ||||
} | ||||
container remote { | ||||
if-feature remote-action; | ||||
description | ||||
"This container describes the configuration parameters | ||||
for forwarding syslog messages to remote relays or | ||||
collectors."; | ||||
list destination { | ||||
key "name"; | ||||
description | ||||
"This list describes a collection of remote logging | ||||
destinations."; | ||||
leaf name { | ||||
type string; | ||||
description | ||||
"An arbitrary name for the endpoint to connect to."; | ||||
} | ||||
choice transport { | ||||
mandatory true; | ||||
description | ||||
"This choice describes the transport option."; | ||||
case tcp { | ||||
container tcp { | ||||
description | ||||
"This container describes the TCP transport | ||||
options."; | ||||
reference | ||||
"RFC 6587: Transmission of Syslog Messages over | ||||
TCP"; | ||||
leaf address { | ||||
type inet:host; | ||||
description | ||||
"The leaf uniquely specifies the address of | ||||
the remote host. One of the following must | ||||
be specified: an ipv4 address, an ipv6 | ||||
address, or a host name."; | ||||
} | ||||
leaf port { | ||||
type inet:port-number; | ||||
default 514; | ||||
description | ||||
"This leaf specifies the port number used to | ||||
deliver messages to the remote server."; | ||||
} | ||||
} | ||||
} | ||||
case udp { | ||||
container udp { | ||||
description | ||||
"This container describes the UDP transport | ||||
options."; | ||||
reference | ||||
"RFC 5426: Transmission of Syslog Messages over | ||||
UDP"; | ||||
leaf address { | ||||
type inet:host; | ||||
description | ||||
"The leaf uniquely specifies the address of | ||||
the remote host. One of the following must be | ||||
specified: an ipv4 address, an ipv6 address, | ||||
or a host name."; | ||||
} | ||||
leaf port { | ||||
type inet:port-number; | ||||
default 514; | ||||
description | ||||
"This leaf specifies the port number used to | ||||
deliver messages to the remote server."; | ||||
} | ||||
} | ||||
} | identity local7 { | |||
case tls { | base syslog-facility; | |||
container tls { | description | |||
description | "The facility for local use 7 messages (23)."; | |||
"This container describes the TLS transport | reference | |||
options."; | "RFC 5424: The Syslog Protocol"; | |||
reference | } | |||
"RFC 5425: Transport Layer Security (TLS) | ||||
Transport Mapping for Syslog "; | grouping severity-filter { | |||
leaf address { | description | |||
type inet:host; | "This grouping defines the processing used to select | |||
description | log messages by comparing syslog message severity using | |||
"The leaf uniquely specifies the address of | the following processing rules: | |||
the remote host. One of the following must be | - if 'none', do not match. | |||
specified: an ipv4 address, an ipv6 address, | - if 'all', match. | |||
or a host name."; | - else compare message severity with the specified severity | |||
} | according to the default compare rule (all messages of the | |||
leaf port { | specified severity and greater match) or if the | |||
type inet:port-number; | select-adv-compare feature is present, the advance-compare | |||
default 6514; | rule."; | |||
description | leaf severity { | |||
"TCP port 6514 has been allocated as the default | type union { | |||
port for syslog over TLS."; | type syslog-severity; | |||
} | type enumeration { | |||
uses tlsc:tls-client-grouping; | enum none { | |||
value 2147483647; | ||||
description | ||||
"This enum describes the case where no severities | ||||
are selected."; | ||||
} | ||||
enum all { | ||||
value -2147483648; | ||||
description | ||||
"This enum describes the case where all severities | ||||
are selected."; | ||||
} | ||||
} | ||||
} | ||||
mandatory true; | ||||
description | ||||
"This leaf specifies the syslog message severity."; | ||||
} | ||||
container advanced-compare { | ||||
when '../severity != "all" and | ||||
../severity != "none"' { | ||||
description | ||||
"The advanced compare container is not applicable for | ||||
severity 'all' or severity 'none'"; | ||||
} | ||||
if-feature select-adv-compare; | ||||
leaf compare { | ||||
type enumeration { | ||||
enum equals { | ||||
description | ||||
"This enum specifies that the severity comparison | ||||
operation will be equals."; | ||||
} | ||||
enum equals-or-higher { | ||||
description | ||||
"This enum specifies that the severity comparison | ||||
operation will be equals or higher."; | ||||
} | ||||
} | ||||
default equals-or-higher; | ||||
description | ||||
"The compare can be used to specify the comparison | ||||
operator that should be used to compare the syslog message | ||||
severity with the specified severity."; | ||||
} | ||||
leaf action { | ||||
type enumeration { | ||||
enum log { | ||||
description | ||||
"This enum specifies that if the compare operation is | ||||
true the message will be logged."; | ||||
} | } | |||
} | enum block { | |||
} | description | |||
uses selector; | "This enum specifies that if the compare operation is | |||
uses structured-data; | true the message will not be logged."; | |||
leaf facility-override { | } | |||
type identityref { | } | |||
base syslog-facility; | default log; | |||
} | description | |||
description | "The action can be used to spectify if the message should | |||
"If specified, this leaf specifies the facility used | be logged or blocked based on the outcome of the compare | |||
to override the facility in messages delivered to | operation."; | |||
the remote server."; | } | |||
} | description | |||
leaf source-interface { | "This container describes additional severity compare | |||
if-feature remote-source-interface; | operations that can be used in place of the default | |||
type if:interface-ref; | severity comparison. The compare leaf specifies the type of | |||
description | the compare that is done and the action leaf specifies the | |||
"This leaf sets the source interface to be used to | intended result. | |||
send messages to the remote syslog server. If not | Example: compare->equals and action->no-match means | |||
set, messages sent to a remote syslog server will | messages that have a severity that is not equal to the | |||
contain the IP address of the interface the syslog | specified severity will be logged."; | |||
message uses to exit the network element"; | } | |||
} | ||||
} | grouping selector { | |||
container signing-options { | description | |||
if-feature signed-messages; | "This grouping defines a syslog selector which is used to | |||
presence | select log messages for the log-actions (console, file, | |||
"If present, syslog-signing options is activated."; | remote, etc.). Choose one or both of the following: | |||
description | facility [<facility> <severity>...] | |||
"This container describes the configuration | pattern-match regular-expression-match-string | |||
parameters for signed syslog messages."; | If both facility and pattern-match are specified, both must | |||
reference | match in order for a log message to be selected."; | |||
"RFC 5848: Signed Syslog Messages"; | container facility-filter { | |||
container cert-signers { | description | |||
description | "This container describes the syslog filter parameters."; | |||
"This container describes the signing certificate | list facility-list { | |||
configuration for Signature Group 0 which covers | key "facility severity"; | |||
the case for administrators who want all Signature | ordered-by user; | |||
Blocks to be sent to a single destination."; | description | |||
list cert-signer { | "This list describes a collection of syslog | |||
key "name"; | facilities and severities."; | |||
description | leaf facility { | |||
"This list describes a collection of syslog | type union { | |||
message signers."; | type identityref { | |||
leaf name { | base syslog-facility; | |||
type string; | } | |||
description | type enumeration { | |||
"This leaf specifies the name of the syslog | enum all { | |||
message signer."; | description | |||
} | "This enum describes the case where all | |||
container cert { | facilities are requested."; | |||
uses ks:private-key-grouping; | } | |||
uses ks:certificate-grouping; | } | |||
description | } | |||
"This is the certificate that is periodically | description | |||
sent to the remote receiver. Selection of the | "The leaf uniquely identifies a syslog facility."; | |||
certificate also implicitly selects the private | } | |||
key used to sign the syslog messages."; | uses severity-filter; | |||
} | } | |||
leaf hash-algorithm { | } | |||
type enumeration { | leaf pattern-match { | |||
enum SHA1 { | if-feature select-match; | |||
value 1; | type string; | |||
description | description | |||
"This enum describes the SHA1 algorithm."; | "This leaf describes a Posix 1003.2 regular expression | |||
} | string that can be used to select a syslog message for | |||
enum SHA256 { | logging. The match is performed on the SYSLOG-MSG field."; | |||
value 2; | reference | |||
description | "RFC 5424: The Syslog Protocol | |||
"This enum describes the SHA256 algorithm."; | Std-1003.1-2008 Regular Expressions"; | |||
} | } | |||
} | ||||
} | grouping structured-data { | |||
description | description | |||
"This leaf describes the syslog signer hash | "This grouping defines the syslog structured data option | |||
algorithm used."; | which is used to select the format used to write log | |||
} | messages."; | |||
} | leaf structured-data { | |||
leaf cert-initial-repeat { | if-feature structured-data; | |||
type uint32; | type boolean; | |||
default 3; | default false; | |||
description | description | |||
"This leaf specifies the number of times each | "This leaf describes how log messages are written. | |||
Certificate Block should be sent before the first | If true, messages will be written with one or more | |||
message is sent."; | STRUCTURED-DATA elements; if false, messages will be | |||
} | written with STRUCTURED-DATA = NILVALUE."; | |||
leaf cert-resend-delay { | reference | |||
type uint32; | "RFC 5424: The Syslog Protocol"; | |||
units "seconds"; | } | |||
default 3600; | } | |||
description | ||||
"This leaf specifies the maximum time delay in | container syslog { | |||
seconds until resending the Certificate Block."; | presence "Enables logging."; | |||
} | description | |||
leaf cert-resend-count { | "This container describes the configuration parameters for | |||
type uint32; | syslog."; | |||
default 0; | container actions { | |||
description | description | |||
"This leaf specifies the maximum number of other | "This container describes the log-action parameters | |||
syslog messages to send until resending the | for syslog."; | |||
Certificate Block."; | container console { | |||
} | if-feature console-action; | |||
leaf sig-max-delay { | presence "Enables logging to the console"; | |||
type uint32; | description | |||
units "seconds"; | "This container describes the configuration parameters | |||
default 60; | for console logging."; | |||
description | uses selector; | |||
"This leaf specifies when to generate a new | } | |||
Signature Block. If this many seconds have | container file { | |||
elapsed since the message with the first message | if-feature file-action; | |||
number of the Signature Block was sent, a new | description | |||
Signature Block should be generated."; | "This container describes the configuration parameters for | |||
} | file logging. If file-archive limits are not supplied, it | |||
leaf sig-number-resends { | is assumed that the local implementation defined limits | |||
type uint32; | will be used."; | |||
default 0; | list log-file { | |||
description | key "name"; | |||
"This leaf specifies the number of times a | description | |||
Signature Block is resent. (It is recommended to | "This list describes a collection of local logging | |||
select a value of greater than 0 in particular | files."; | |||
when the UDP transport RFC 5426 is used.)."; | leaf name { | |||
} | type inet:uri { | |||
leaf sig-resend-delay { | pattern 'file:.*'; | |||
type uint32; | } | |||
units "seconds"; | description | |||
default 5; | "This leaf specifies the name of the log file which | |||
description | MUST use the uri scheme file:."; | |||
"This leaf specifies when to send the next | } | |||
Signature Block transmission based on time. If | uses selector; | |||
this many seconds have elapsed since the previous | uses structured-data; | |||
sending of this Signature Block, resend it."; | container file-rotation { | |||
} | description | |||
leaf sig-resend-count { | "This container describes the configuration | |||
type uint32; | parameters for log file rotation."; | |||
default 0; | leaf number-of-files { | |||
description | if-feature file-limit-size; | |||
"This leaf specifies when to send the next | type uint32; | |||
Signature Block transmission based on a count. | default 1; | |||
If this many other syslog messages have been | description | |||
sent since the previous sending of this | "This leaf specifies the maximum number of log | |||
Signature Block, resend it. A value of 0 means | files retained. Specify 1 for implementations | |||
that you don't resend based on the number of | that only support one log file."; | |||
messages."; | } | |||
} | leaf max-file-size { | |||
} | if-feature file-limit-size; | |||
} | type uint32; | |||
} | units "megabytes"; | |||
} | description | |||
} | "This leaf specifies the maximum log file size."; | |||
} | } | |||
} | leaf rollover { | |||
<CODE ENDS> | if-feature file-limit-duration; | |||
type uint32; | ||||
units "minutes"; | ||||
description | ||||
"This leaf specifies the length of time that log | ||||
events should be written to a specific log file. | ||||
Log events that arrive after the rollover period | ||||
cause the current log file to be closed and a new | ||||
log file to be opened."; | ||||
} | ||||
leaf retention { | ||||
if-feature file-limit-duration; | ||||
type uint32; | ||||
units "hours"; | ||||
description | ||||
"This leaf specifies the length of time that | ||||
completed/closed log event files should be stored | ||||
in the file system before they are deleted."; | ||||
} | ||||
} | ||||
} | ||||
} | ||||
container remote { | ||||
if-feature remote-action; | ||||
description | ||||
"This container describes the configuration parameters | ||||
for forwarding syslog messages to remote relays or | ||||
collectors."; | ||||
list destination { | ||||
key "name"; | ||||
description | ||||
"This list describes a collection of remote logging | ||||
destinations."; | ||||
leaf name { | ||||
type string; | ||||
description | ||||
"An arbitrary name for the endpoint to connect to."; | ||||
} | ||||
choice transport { | ||||
mandatory true; | ||||
description | ||||
"This choice describes the transport option."; | ||||
case udp { | ||||
container udp { | ||||
description | ||||
"This container describes the UDP transport | ||||
options."; | ||||
reference | ||||
"RFC 5426: Transmission of Syslog Messages over | ||||
UDP"; | ||||
leaf address { | ||||
type inet:host; | ||||
description | ||||
"The leaf uniquely specifies the address of | ||||
the remote host. One of the following must be | ||||
specified: an ipv4 address, an ipv6 address, | ||||
or a host name."; | ||||
} | ||||
leaf port { | ||||
type inet:port-number; | ||||
default 514; | ||||
description | ||||
"This leaf specifies the port number used to | ||||
deliver messages to the remote server."; | ||||
} | ||||
} | ||||
} | ||||
case tls { | ||||
container tls { | ||||
description | ||||
"This container describes the TLS transport | ||||
options."; | ||||
reference | ||||
"RFC 5425: Transport Layer Security (TLS) | ||||
Transport Mapping for Syslog "; | ||||
leaf address { | ||||
type inet:host; | ||||
description | ||||
"The leaf uniquely specifies the address of | ||||
the remote host. One of the following must be | ||||
specified: an ipv4 address, an ipv6 address, | ||||
or a host name."; | ||||
} | ||||
leaf port { | ||||
type inet:port-number; | ||||
default 6514; | ||||
description | ||||
"TCP port 6514 has been allocated as the default | ||||
port for syslog over TLS."; | ||||
} | ||||
uses tlsc:tls-client-grouping; | ||||
} | ||||
} | ||||
} | ||||
uses selector; | ||||
uses structured-data; | ||||
leaf facility-override { | ||||
type identityref { | ||||
base syslog-facility; | ||||
} | ||||
description | ||||
"If specified, this leaf specifies the facility used | ||||
to override the facility in messages delivered to | ||||
the remote server."; | ||||
} | ||||
leaf source-interface { | ||||
if-feature remote-source-interface; | ||||
type if:interface-ref; | ||||
description | ||||
"This leaf sets the source interface to be used to | ||||
send messages to the remote syslog server. If not | ||||
set, messages sent to a remote syslog server will | ||||
contain the IP address of the interface the syslog | ||||
message uses to exit the network element"; | ||||
} | ||||
container signing { | ||||
if-feature signed-messages; | ||||
presence | ||||
"If present, syslog-signing options is activated."; | ||||
description | ||||
"This container describes the configuration | ||||
parameters for signed syslog messages."; | ||||
reference | ||||
"RFC 5848: Signed Syslog Messages"; | ||||
container cert-signers { | ||||
description | ||||
"This container describes the signing certificate | ||||
configuration for Signature Group 0 which covers | ||||
the case for administrators who want all Signature | ||||
Blocks to be sent to a single destination."; | ||||
list cert-signer { | ||||
key "name"; | ||||
description | ||||
"This list describes a collection of syslog | ||||
message signers."; | ||||
leaf name { | ||||
type string; | ||||
description | ||||
"This leaf specifies the name of the syslog | ||||
message signer."; | ||||
} | ||||
container cert { | ||||
uses ks:private-key-grouping; | ||||
uses ks:certificate-grouping; | ||||
description | ||||
"This is the certificate that is periodically | ||||
sent to the remote receiver. Selection of the | ||||
certificate also implicitly selects the private | ||||
key used to sign the syslog messages."; | ||||
} | ||||
leaf hash-algorithm { | ||||
type enumeration { | ||||
enum SHA1 { | ||||
value 1; | ||||
description | ||||
"This enum describes the SHA1 algorithm."; | ||||
} | ||||
enum SHA256 { | ||||
value 2; | ||||
description | ||||
"This enum describes the SHA256 algorithm."; | ||||
} | ||||
} | ||||
description | ||||
"This leaf describes the syslog signer hash | ||||
algorithm used."; | ||||
} | ||||
} | ||||
leaf cert-initial-repeat { | ||||
type uint32; | ||||
default 3; | ||||
description | ||||
"This leaf specifies the number of times each | ||||
Certificate Block should be sent before the first | ||||
message is sent."; | ||||
} | ||||
leaf cert-resend-delay { | ||||
type uint32; | ||||
units "seconds"; | ||||
default 3600; | ||||
description | ||||
"This leaf specifies the maximum time delay in | ||||
seconds until resending the Certificate Block."; | ||||
} | ||||
leaf cert-resend-count { | ||||
type uint32; | ||||
default 0; | ||||
description | ||||
"This leaf specifies the maximum number of other | ||||
syslog messages to send until resending the | ||||
Certificate Block."; | ||||
} | ||||
leaf sig-max-delay { | ||||
type uint32; | ||||
units "seconds"; | ||||
default 60; | ||||
description | ||||
"This leaf specifies when to generate a new | ||||
Signature Block. If this many seconds have | ||||
elapsed since the message with the first message | ||||
number of the Signature Block was sent, a new | ||||
Signature Block should be generated."; | ||||
} | ||||
leaf sig-number-resends { | ||||
type uint32; | ||||
default 0; | ||||
description | ||||
"This leaf specifies the number of times a | ||||
Signature Block is resent. (It is recommended to | ||||
select a value of greater than 0 in particular | ||||
when the UDP transport RFC 5426 is used.)."; | ||||
} | ||||
leaf sig-resend-delay { | ||||
type uint32; | ||||
units "seconds"; | ||||
default 5; | ||||
description | ||||
"This leaf specifies when to send the next | ||||
Signature Block transmission based on time. If | ||||
this many seconds have elapsed since the previous | ||||
sending of this Signature Block, resend it."; | ||||
} | ||||
leaf sig-resend-count { | ||||
type uint32; | ||||
default 0; | ||||
description | ||||
"This leaf specifies when to send the next | ||||
Signature Block transmission based on a count. | ||||
If this many other syslog messages have been | ||||
sent since the previous sending of this | ||||
Signature Block, resend it. A value of 0 means | ||||
that you don't resend based on the number of | ||||
messages."; | ||||
} | ||||
} | ||||
} | ||||
} | ||||
} | ||||
} | ||||
} | ||||
} | ||||
<CODE ENDS> | ||||
Figure 3. ietf-syslog Module | Figure 3. ietf-syslog Module | |||
5. Usage Examples | 5. Usage Examples | |||
Requirement: | Requirement: | |||
Enable console logging of syslogs of severity critical | Enable console logging of syslogs of severity critical | |||
Here is the example syslog configuration xml: | Here is the example syslog configuration xml: | |||
<syslog xmlns="urn:ietf:params:xml:ns:yang:ietf-syslog"> | <syslog xmlns="urn:ietf:params:xml:ns:yang:ietf-syslog"> | |||
<actions> | <actions> | |||
<console> | <console> | |||
<facility-filter> | <facility-filter> | |||
<facility-list> | <facility-list> | |||
<facility>all</facility> | <facility>all</facility> | |||
skipping to change at page 29, line 23 ¶ | skipping to change at page 28, line 26 ¶ | |||
Following the format in [RFC3688], the following registration is | Following the format in [RFC3688], the following registration is | |||
requested: | requested: | |||
URI: urn:ietf:params:xml:ns:yang:ietf-syslog | URI: urn:ietf:params:xml:ns:yang:ietf-syslog | |||
Registrant Contact: The IESG. | Registrant Contact: The IESG. | |||
XML: N/A, the requested URI is an XML namespace. | XML: N/A, the requested URI is an XML namespace. | |||
7.2. The YANG Module Names Registry | 7.2. The YANG Module Names Registry | |||
This document registers one YANG module in the YANG Module Names | This document registers one YANG module in the YANG Module Names | |||
registry [RFC7895]/>. Following the format in [RFC7950]/>, the | registry [RFC7895]. Following the format in [RFC7950], the following | |||
following registration is requested: | registration is requested: | |||
name: ietf-syslog | name: ietf-syslog | |||
namespace: urn:ietf:params:xml:ns:yang:ietf-syslog | namespace: urn:ietf:params:xml:ns:yang:ietf-syslog | |||
prefix: ietf-syslog | prefix: ietf-syslog | |||
reference: RFC zzzz | reference: RFC zzzz | |||
8. Security Considerations | 8. Security Considerations | |||
The YANG module defined in this document is designed to be accessed | The YANG module defined in this document is designed to be accessed | |||
via YANG based management protocols, such as NETCONF [RFC6241] and | via YANG based management protocols, such as NETCONF [RFC6241] and | |||
skipping to change at page 30, line 33 ¶ | skipping to change at page 29, line 35 ¶ | |||
[I-D.ietf-netconf-keystore] | [I-D.ietf-netconf-keystore] | |||
Watsen, K., "YANG Data Model for a "Keystore" Mechanism", | Watsen, K., "YANG Data Model for a "Keystore" Mechanism", | |||
draft-ietf-netconf-keystore-04 (work in progress), October | draft-ietf-netconf-keystore-04 (work in progress), October | |||
2017. | 2017. | |||
[I-D.ietf-netconf-tls-client-server] | [I-D.ietf-netconf-tls-client-server] | |||
Watsen, K. and G. Wu, "YANG Groupings for TLS Clients and | Watsen, K. and G. Wu, "YANG Groupings for TLS Clients and | |||
TLS Servers", draft-ietf-netconf-tls-client-server-05 | TLS Servers", draft-ietf-netconf-tls-client-server-05 | |||
(work in progress), October 2017. | (work in progress), October 2017. | |||
[I-D.ietf-netmod-yang-tree-diagrams] | ||||
Bjorklund, M. and L. Berger, "YANG Tree Diagrams", draft- | ||||
ietf-netmod-yang-tree-diagrams-05 (work in progress), | ||||
January 2018. | ||||
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
<https://www.rfc-editor.org/info/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
[RFC5424] Gerhards, R., "The Syslog Protocol", RFC 5424, | [RFC5424] Gerhards, R., "The Syslog Protocol", RFC 5424, | |||
DOI 10.17487/RFC5424, March 2009, | DOI 10.17487/RFC5424, March 2009, | |||
<https://www.rfc-editor.org/info/rfc5424>. | <https://www.rfc-editor.org/info/rfc5424>. | |||
[RFC5425] Miao, F., Ed., Ma, Y., Ed., and J. Salowey, Ed., | [RFC5425] Miao, F., Ed., Ma, Y., Ed., and J. Salowey, Ed., | |||
skipping to change at page 31, line 9 ¶ | skipping to change at page 30, line 18 ¶ | |||
<https://www.rfc-editor.org/info/rfc5425>. | <https://www.rfc-editor.org/info/rfc5425>. | |||
[RFC5426] Okmianski, A., "Transmission of Syslog Messages over UDP", | [RFC5426] Okmianski, A., "Transmission of Syslog Messages over UDP", | |||
RFC 5426, DOI 10.17487/RFC5426, March 2009, | RFC 5426, DOI 10.17487/RFC5426, March 2009, | |||
<https://www.rfc-editor.org/info/rfc5426>. | <https://www.rfc-editor.org/info/rfc5426>. | |||
[RFC5848] Kelsey, J., Callas, J., and A. Clemm, "Signed Syslog | [RFC5848] Kelsey, J., Callas, J., and A. Clemm, "Signed Syslog | |||
Messages", RFC 5848, DOI 10.17487/RFC5848, May 2010, | Messages", RFC 5848, DOI 10.17487/RFC5848, May 2010, | |||
<https://www.rfc-editor.org/info/rfc5848>. | <https://www.rfc-editor.org/info/rfc5848>. | |||
[RFC6587] Gerhards, R. and C. Lonvick, "Transmission of Syslog | ||||
Messages over TCP", RFC 6587, DOI 10.17487/RFC6587, April | ||||
2012, <https://www.rfc-editor.org/info/rfc6587>. | ||||
[RFC7223] Bjorklund, M., "A YANG Data Model for Interface | [RFC7223] Bjorklund, M., "A YANG Data Model for Interface | |||
Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, | Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, | |||
<https://www.rfc-editor.org/info/rfc7223>. | <https://www.rfc-editor.org/info/rfc7223>. | |||
[RFC7895] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module | ||||
Library", RFC 7895, DOI 10.17487/RFC7895, June 2016, | ||||
<https://www.rfc-editor.org/info/rfc7895>. | ||||
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", | [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", | |||
RFC 7950, DOI 10.17487/RFC7950, August 2016, | RFC 7950, DOI 10.17487/RFC7950, August 2016, | |||
<https://www.rfc-editor.org/info/rfc7950>. | <https://www.rfc-editor.org/info/rfc7950>. | |||
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | |||
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | |||
May 2017, <https://www.rfc-editor.org/info/rfc8174>. | May 2017, <https://www.rfc-editor.org/info/rfc8174>. | |||
[Std-1003.1-2008] | [Std-1003.1-2008] | |||
The Open Group, ""Chapter 9: Regular Expressions". The | The Open Group, ""Chapter 9: Regular Expressions". The | |||
skipping to change at page 31, line 47 ¶ | skipping to change at page 31, line 10 ¶ | |||
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., | [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., | |||
and A. Bierman, Ed., "Network Configuration Protocol | and A. Bierman, Ed., "Network Configuration Protocol | |||
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, | (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, | |||
<https://www.rfc-editor.org/info/rfc6241>. | <https://www.rfc-editor.org/info/rfc6241>. | |||
[RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration | [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration | |||
Protocol (NETCONF) Access Control Model", RFC 6536, | Protocol (NETCONF) Access Control Model", RFC 6536, | |||
DOI 10.17487/RFC6536, March 2012, | DOI 10.17487/RFC6536, March 2012, | |||
<https://www.rfc-editor.org/info/rfc6536>. | <https://www.rfc-editor.org/info/rfc6536>. | |||
[RFC7895] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module | ||||
Library", RFC 7895, DOI 10.17487/RFC7895, June 2016, | ||||
<https://www.rfc-editor.org/info/rfc7895>. | ||||
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF | [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF | |||
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, | Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, | |||
<https://www.rfc-editor.org/info/rfc8040>. | <https://www.rfc-editor.org/info/rfc8040>. | |||
Appendix A. Implementor Guidelines | Appendix A. Implementor Guidelines | |||
A.1. Extending Facilities | A.1. Extending Facilities | |||
Many vendors extend the list of facilities available for logging in | Many vendors extend the list of facilities available for logging in | |||
their implementation. Additional facilities may not work with the | their implementation. Additional facilities may not work with the | |||
End of changes. 76 change blocks. | ||||
892 lines changed or deleted | 847 lines changed or added | |||
This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |