draft-ietf-netmod-syslog-model-18.txt   draft-ietf-netmod-syslog-model-19.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: June 13, 2018 Verizon Wireless Expires: July 16, 2018 Verizon Wireless
December 12, 2017 January 12, 2018
A YANG Data Model for Syslog Configuration A YANG Data Model for Syslog Configuration
draft-ietf-netmod-syslog-model-18 draft-ietf-netmod-syslog-model-19
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
with finalized values at the time of publication. This note with finalized values at the time of publication. This note
summarizes all of the substitutions that are needed. No other RFC summarizes all of the substitutions that are needed. No other RFC
Editor instructions are specified elsewhere in this document. Editor instructions are specified elsewhere in this document.
Artwork in this document contains shorthand references to drafts in Artwork in this document contains shorthand references to drafts in
progress. Please apply the following replacements: progress. Please apply the following replacements:
o "xxxx" --> the assigned RFC value for draft-ietf-netconf-keystore o "I-D.ietf-netconf-keystore" --> the assigned RFC value for draft-
ietf-netconf-keystore
o "yyyy" --> the assigned RFC value for draft-ietf-netconf-tls- o "I-D.ietf-netconf-tls-client-server" --> the assigned RFC value
client-server for draft-ietf-netconf-tls-client-server
o "zzzz" --> the assigned RFC value for this draft o "zzzz" --> the assigned RFC value for this draft
Status of this Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
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 http://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 June 13, 2018.
This Internet-Draft will expire on July 16, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 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 (http://trustee.ietf.org/ Provisions Relating to IETF Documents
license-info) in effect on the date of publication of this document. (https://trustee.ietf.org/license-info) in effect on the date of
Please review these documents carefully, as they describe your rights publication of this document. Please review these documents
and restrictions with respect to this document. Code Components carefully, as they describe your rights and restrictions with respect
extracted from this document must include Simplified BSD License text to this document. Code Components extracted from this document must
as described in Section 4.e of the Trust Legal Provisions and are include Simplified BSD License text as described in Section 4.e of
provided without warranty as described in the Simplified BSD License. the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2 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 . . . . . . . . . . . . . . . . . . 3 1.3. Tree Diagram Notation . . . . . . . . . . . . . . . . . . 4
2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4
3. Design of the Syslog Model . . . . . . . . . . . . . . . . . . 4 3. Design of the Syslog Model . . . . . . . . . . . . . . . . . 5
3.1. Syslog Module . . . . . . . . . . . . . . . . . . . . . . 6 3.1. Syslog Module . . . . . . . . . . . . . . . . . . . . . . 6
4. Syslog YANG Module . . . . . . . . . . . . . . . . . . . . . . 9 4. Syslog YANG Module . . . . . . . . . . . . . . . . . . . . . 9
4.1. The ietf-syslog Module . . . . . . . . . . . . . . . . . . 9 4.1. The ietf-syslog Module . . . . . . . . . . . . . . . . . 9
5. Usage Examples . . . . . . . . . . . . . . . . . . . . . . . . 26 5. Usage Examples . . . . . . . . . . . . . . . . . . . . . . . 27
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 27 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 28
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29
7.1. The YANG Module Names Registry . . . . . . . . . . . . . . 28 7.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 29
8. Security Considerations . . . . . . . . . . . . . . . . . . . 29 7.2. The YANG Module Names Registry . . . . . . . . . . . . . 29
9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 29 8. Security Considerations . . . . . . . . . . . . . . . . . . . 29
9.1. Normative References . . . . . . . . . . . . . . . . . . . 29 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 30
9.2. Informative References . . . . . . . . . . . . . . . . . . 31 9.1. Normative References . . . . . . . . . . . . . . . . . . 30
Appendix A. Implementor Guidelines . . . . . . . . . . . . . . . . 31 9.2. Informative References . . . . . . . . . . . . . . . . . 31
Appendix A.1. Extending Facilities . . . . . . . . . . . . . . 31 Appendix A. Implementor Guidelines . . . . . . . . . . . . . . . 33
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 32 A.1. Extending Facilities . . . . . . . . . . . . . . . . . . 33
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 34
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 3, line 20 skipping to change at page 3, line 34
machines. The processing is determined by the "facility" that machines. The processing is determined by the "facility" that
originated the message and the "severity" assigned to the message by originated the message and the "severity" assigned to the message by
the facility. the facility.
We are using definitions of syslog protocol from [RFC5424] in this We are using definitions of syslog protocol from [RFC5424] in this
RFC. RFC.
1.1. Requirements Language 1.1. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
document are to be interpreted as described in [RFC2119] and "OPTIONAL" in this document are to be interpreted as described in BCP
[RFC8174]. 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
1.2. Terminology 1.2. Terminology
The term "originator" is defined in [RFC5424]: an "originator" The term "originator" is defined in [RFC5424]: an "originator"
generates syslog content to be carried in a message. generates syslog content to be carried in a message.
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
skipping to change at page 3, line 53 skipping to change at page 4, line 19
follows: follows:
o Brackets "[" and "]" enclose list keys. o Brackets "[" and "]" enclose list keys.
o Braces "{" and "}" enclose feature names, and indicate that the o Braces "{" and "}" enclose feature names, and indicate that the
named feature must be present for the subtree to be present. named feature must be present for the subtree to be present.
o Abbreviations before data node names: "rw" means configuration o Abbreviations before data node names: "rw" means configuration
(read-write) and "ro" state data (read-only). (read-write) and "ro" state data (read-only).
o Symbols after data node names: "?" means an optional node, "!" o Symbols after data node names: "?" means an optional node, "!"
means a presence container, and "*" denotes a list and leaf-list. means a presence container, and "*" denotes a list and leaf-list.
o Parentheses enclose choice and case nodes, and case nodes are also o Parentheses enclose choice and case nodes, and case nodes are also
marked with a colon (":"). marked with a colon (":").
o Ellipsis ("...") stands for contents of subtrees that are not o Ellipsis ("...") stands for contents of subtrees that are not
shown. shown.
2. Problem Statement 2. Problem Statement
skipping to change at page 4, line 40 skipping to change at page 5, line 19
This draft addresses the common leafs between implementations and This draft addresses the common leafs between implementations and
creates a common model, which can be augmented with proprietary creates a common model, which can be augmented with proprietary
features, if necessary. This model is designed to be very simple for features, if necessary. This model is designed to be very simple for
maximum flexibility. maximum flexibility.
Some optional features are defined in this document to specify Some optional features are defined in this document to specify
functionality that is present in specific vendor configurations. functionality that is present in specific vendor configurations.
Syslog consists of originators and collectors. The following diagram Syslog consists of originators and collectors. The following diagram
shows syslog messages flowing from an originator, to collectors where shows syslog messages flowing from originators, to collectors where
filtering can take place. filtering can take place.
Originators Originators
+-------------+ +-------------+ +-------------+ +-------------+ +-------------+ +-------------+ +-------------+ +-------------+
| Various | | OS | | | | Remote | | Various | | OS | | | | Remote |
| Components | | Kernel | | Line Cards | | Servers | | Components | | Kernel | | Line Cards | | Servers |
+-------------+ +-------------+ +-------------+ +-------------+ +-------------+ +-------------+ +-------------+ +-------------+
+-------------+ +-------------+ +-------------+ +-------------+ +-------------+ +-------------+ +-------------+ +-------------+
| SNMP | | Interface | | Standby | | Syslog | | SNMP | | Interface | | Standby | | Syslog |
skipping to change at page 5, line 31 skipping to change at page 5, line 48
| |
+-------------+--------------+ +-------------+--------------+
| | | | | |
v v v v v v
Collectors Collectors
+----------+ +----------+ +----------------+ +----------+ +----------+ +----------------+
| | | Log | |Remote Relay(s)/| | | | Log | |Remote Relay(s)/|
| Console | | File(s) | |Collector(s) | | Console | | File(s) | |Collector(s) |
+----------+ +----------+ +----------------+ +----------+ +----------+ +----------------+
Figure 1. Syslog Processing Flow Figure 1. Syslog Processing Flow
Collectors are configured using the leaves in the syslog model Collectors are configured using the leaves in the syslog model
"actions" container which correspond to each message collector: "actions" container which correspond to each message collector:
console console
log file(s) log file(s)
remote relay(s)/collector(s) remote relay(s)/collector(s)
Within each action, a selector is used to filter syslog messages. A Within each action, a selector is used to filter syslog messages. A
selector consists of a list of one or more facility-severity matches, selector consists of a list of one or more facility-severity matches,
and, if supported via the select-match feature, an optional regular and, if supported via the select-match feature, an optional regular
expression pattern match that is performed on the [RFC5424] field. expression pattern match that is performed on the [RFC5424] field.
A syslog message is processed if: A syslog message is processed if:
There is an element of facility-list (F, S) where There is an element of facility-list (F, S) where
the message facility matches F the message facility matches F
and the message severity matches S and the message severity matches S
and/or the message text matches the regex pattern (if it and/or the message text matches the regex pattern (if it
is present) is present)
The facility is one of a specific syslog-facility, or all facilities. The facility is one of a specific syslog-facility, or all facilities.
The severity is one of type syslog-severity, all severities, or none. The severity is one of type syslog-severity, all severities, or none.
None is a special case that can be used to disable a filter. When None is a special case that can be used to disable a filter. When
filtering severity, the default comparison is that messages of the filtering severity, the default comparison is that messages of the
specified severity and higher are selected to be logged. This is specified severity and higher are selected to be logged. This is
shown in the model as "default equals-or-higher". This behavior can shown in the model as "default equals-or-higher". This behavior can
be altered if the select-adv-compare feature is enabled to specify a be altered if the select-adv-compare feature is enabled to specify a
compare operation and an action. Compare operations are: "equals" to compare operation and an action. Compare operations are: "equals" to
skipping to change at page 7, line 5 skipping to change at page 6, line 46
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 Section 1.3 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
| +--rw pattern-match? string {select-match}? | +--rw pattern-match? string {select-match}?
+--rw file {file-action}? +--rw file {file-action}?
| +--rw log-file* [name] | +--rw log-file* [name]
| +--rw name inet:uri | +--rw name inet:uri
| +--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
| +--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 file-rotation | +--rw file-rotation
| +--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) | +--:(tcp)
| | +--rw tcp | | +--rw tcp
| | +--rw address? inet:host | | +--rw address? inet:host
| | +--rw port? inet:port-number | | +--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)?
| | +--:(certificate) | | +--:(certificate)
| | +--rw certificate? leafref | | +--rw certificate? leafref
| +--rw server-auth | +--rw server-auth
| | +--rw pinned-ca-certs? leafref | | +--rw pinned-ca-certs? leafref
| | +--rw pinned-server-certs? leafref | | +--rw pinned-server-certs? leafref
| +--rw hello-params | +--rw hello-params
| {tls-client-hello-params-config}? | {tls-client-hello-params-config}?
| +--rw tls-versions | +--rw tls-versions
| | +--rw tls-version* identityref | | +--rw tls-version* identityref
| +--rw cipher-suites | +--rw cipher-suites
| +--rw cipher-suite* identityref | +--rw cipher-suite* identityref
+--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
+--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-options! {signed-messages}?
+--rw cert-signers +--rw cert-signers
+--rw cert-signer* [name] +--rw cert-signer* [name]
| +--rw name string | +--rw name string
| +--rw certificate | +--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
| | binary | | binary
| +--rw hash-algorithm? enumeration | +--rw hash-algorithm? enumeration
+--rw cert-initial-repeat? uint32 +--rw cert-initial-repeat? uint32
+--rw cert-resend-delay? uint32 +--rw cert-resend-delay? uint32
+--rw cert-resend-count? uint32 +--rw cert-resend-count? uint32
+--rw sig-max-delay? uint32 +--rw sig-max-delay? uint32
+--rw sig-number-resends? uint32 +--rw sig-number-resends? uint32
+--rw sig-resend-delay? uint32 +--rw sig-resend-delay? uint32
+--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 [RFC6021], [RFC7223], groupings This module imports typedefs from [RFC7223], groupings from [I-
from [RFC yyyy], and [RFC xxxx], and it references [RFC5424], D.ietf-netconf-keystore], and [I-D.ietf-netconf-tls-client-server],
[RFC5425], [RFC5426], [RFC6587], and [RFC5848]. and it references [RFC5424], [RFC5425], [RFC5426], [RFC6587], and
[RFC5848] and [Std-1003.1-2008].
<CODE BEGINS> file "ietf-syslog.yang@2017-12-12.yang"
module ietf-syslog {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-syslog";
prefix syslog;
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: INET Types Model";
}
import ietf-interfaces { <CODE BEGINS> file "ietf-syslog@2018-01-12.yang"
prefix if; module ietf-syslog {
reference yang-version 1.1;
"RFC 7223: Interfaces Model";
}
import ietf-tls-client { namespace "urn:ietf:params:xml:ns:yang:ietf-syslog";
prefix tlsc; prefix syslog;
reference
"RFC xxxx: Keystore Model";
}
import ietf-keystore { import ietf-inet-types {
prefix ks; prefix inet;
reference reference
"RFC yyyy: TLS Client and Server Models"; "RFC 6991: INET Types Model";
} }
organization "IETF import ietf-interfaces {
NETMOD (Network Modeling) Working Group"; prefix if;
reference
"RFC 7223: Interfaces Model";
}
contact import ietf-tls-client {
"WG Web: <http://tools.ietf.org/wg/netmod/> prefix tlsc;
WG List: <mailto:netmod@ietf.org> reference
"I-D.ietf-netconf-tls-client-server: TLS Client and Server Models";
}
Editor: Kiran Agrahara Sreenivasa import ietf-keystore {
<mailto:kirankoushik.agraharasreenivasa@ prefix ks;
verizonwireless.com> reference
"I-D.ietf-netconf-keystore: Keystore Model";
}
Editor: Clyde Wildes organization
<mailto:cwildes@cisco.com>"; "IETF NETMOD (Network Modeling) Working Group";
description
"This module contains a collection of YANG definitions
for syslog configuration.
Copyright (c) 2017 IETF Trust and the persons identified as contact
authors of the code. All rights reserved. "WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
Redistribution and use in source and binary forms, with or Editor: Kiran Agrahara Sreenivasa
without modification, is permitted pursuant to, and subject to <mailto:kirankoushik.agraharasreenivasa@
the license terms contained in, the Simplified BSD License set verizonwireless.com>
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL Editor: Clyde Wildes
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and <mailto:cwildes@cisco.com>";
'OPTIONAL' in the module text are to be interpreted as description
described in RFC 2119 (http://tools.ietf.org/html/rfc2119). "This module contains a collection of YANG definitions
for syslog configuration.
This version of this YANG module is part of RFC zzzz Copyright (c) 2018 IETF Trust and the persons identified as
(http://tools.ietf.org/html/rfczzzz); see the RFC itself for authors of the code. All rights reserved.
full legal notices.";
revision 2017-12-12 { Redistribution and use in source and binary forms, with or
description without modification, is permitted pursuant to, and subject to
"Initial Revision"; the license terms contained in, the Simplified BSD License set
reference forth in Section 4.c of the IETF Trust's Legal Provisions
"RFC zzzz: Syslog YANG Model"; Relating to IETF Documents
} (http://trustee.ietf.org/license-info).
feature console-action { The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
description NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
"This feature indicates that the local console action is 'OPTIONAL' in the module text are to be interpreted as
supported."; described in RFC 2119 (http://tools.ietf.org/html/rfc2119).
}
feature file-action { This version of this YANG module is part of RFC zzzz
description (http://tools.ietf.org/html/rfczzzz); see the RFC itself for
"This feature indicates that the local file action is full legal notices.";
supported.";
}
feature file-limit-size { revision 2018-01-12 {
description description
"This feature indicates that file logging resources "Initial Revision";
are managed using size and number limits."; reference
} "RFC zzzz: Syslog YANG Model";
}
feature file-limit-duration { feature console-action {
description description
"This feature indicates that file logging resources "This feature indicates that the local console action is
are managed using time based limits."; supported.";
} }
feature remote-action { feature file-action {
description description
"This feature indicates that the remote server action is "This feature indicates that the local file action is
supported."; supported.";
} }
feature remote-source-interface { feature file-limit-size {
description description
"This feature indicates that source-interface is supported "This feature indicates that file logging resources
supported for the remote-action."; are managed using size and number limits.";
} }
feature select-adv-compare { feature file-limit-duration {
description description
"This feature represents the ability to select messages "This feature indicates that file logging resources
using the additional comparison operators when comparing are managed using time based limits.";
the syslog message severity."; }
}
feature select-match { feature remote-action {
description description
"This feature represents the ability to select messages "This feature indicates that the remote server action is
based on a Posix 1003.2 regular expression pattern match."; supported.";
} }
feature structured-data { feature remote-source-interface {
description description
"This feature represents the ability to log messages "This feature indicates that source-interface is supported
in structured-data format."; supported for the remote-action.";
reference }
"RFC 5424: The Syslog Protocol";
}
feature signed-messages { feature select-adv-compare {
description description
"This feature represents the ability to configure signed "This feature represents the ability to select messages
syslog messages."; using the additional comparison operators when comparing
reference the syslog message severity.";
"RFC 5848: Signed Syslog Messages"; }
}
typedef syslog-severity { feature select-match {
type enumeration { description
enum "emergency" { "This feature represents the ability to select messages
value 0; based on a Posix 1003.2 regular expression pattern match.";
description }
"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.";
reference
"RFC 5424: The Syslog Protocol";
}
identity syslog-facility { feature structured-data {
description description
"This identity is used as a base for all syslog facilities."; "This feature represents the ability to log messages
reference in structured-data format.";
"RFC 5424: The Syslog Protocol"; 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";
}
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.";
reference
"RFC 5424: The Syslog Protocol";
}
identity user { identity syslog-facility {
base syslog-facility; description
description "This identity is used as a base for all syslog facilities.";
"The facility for user-level messages (1)."; reference
"RFC 5424: The Syslog Protocol";
}
reference identity kern {
"RFC 5424: The Syslog Protocol"; base syslog-facility;
} description
"The facility for kernel messages (0).";
reference
"RFC 5424: The Syslog Protocol";
}
identity mail { identity user {
base syslog-facility; base syslog-facility;
description description
"The facility for the mail system (2)."; "The facility for user-level messages (1).";
reference reference
"RFC 5424: The Syslog Protocol"; "RFC 5424: The Syslog Protocol";
} }
identity daemon { identity mail {
base syslog-facility; base syslog-facility;
description description
"The facility for the system daemons (3)."; "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 auth {
base syslog-facility; base syslog-facility;
description description
"The facility for security/authorization messages (4)."; "The facility for security/authorization messages (4).";
reference reference
"RFC 5424: The Syslog Protocol"; "RFC 5424: The Syslog Protocol";
} }
identity syslog { identity syslog {
base syslog-facility; base syslog-facility;
description description
"The facility for messages generated internally by syslogd "The facility for messages generated internally by syslogd
facility (5)."; facility (5).";
reference reference
"RFC 5424: The Syslog Protocol"; "RFC 5424: The Syslog Protocol";
} }
identity lpr { identity lpr {
base syslog-facility; base syslog-facility;
description description
"The facility for the line printer subsystem (6)."; "The facility for the line printer subsystem (6).";
reference reference
"RFC 5424: The Syslog Protocol"; "RFC 5424: The Syslog Protocol";
} }
identity news { identity news {
base syslog-facility; base syslog-facility;
description description
"The facility for the network news subsystem (7)."; "The facility for the network news subsystem (7).";
reference reference
"RFC 5424: The Syslog Protocol"; "RFC 5424: The Syslog Protocol";
} }
identity uucp { identity uucp {
base syslog-facility; base syslog-facility;
description description
"The facility for the UUCP subsystem (8)."; "The facility for the UUCP subsystem (8).";
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 cron { identity authpriv {
base syslog-facility; base syslog-facility;
description description
"The facility for the clock daemon (9)."; "The facility for privileged security/authorization messages
reference (10).";
"RFC 5424: The Syslog Protocol"; reference
} "RFC 5424: The Syslog Protocol";
}
identity authpriv { identity ftp {
base syslog-facility; base syslog-facility;
description description
"The facility for privileged security/authorization messages "The facility for the FTP daemon (11).";
(10)."; reference
reference "RFC 5424: The Syslog Protocol";
"RFC 5424: The Syslog Protocol"; }
}
identity ftp { identity ntp {
base syslog-facility; base syslog-facility;
description description
"The facility for the FTP daemon (11)."; "The facility for the NTP subsystem (12).";
reference reference
"RFC 5424: The Syslog Protocol"; "RFC 5424: The Syslog Protocol";
} }
identity ntp { identity audit {
base syslog-facility; base syslog-facility;
description description
"The facility for the NTP subsystem (12)."; "The facility for log audit messages (13).";
reference reference
"RFC 5424: The Syslog Protocol"; "RFC 5424: The Syslog Protocol";
} }
identity audit { identity console {
base syslog-facility; base syslog-facility;
description description
"The facility for log audit messages (13)."; "The facility for log alert messages (14).";
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 console { identity local0 {
base syslog-facility; base syslog-facility;
description description
"The facility for log alert messages (14)."; "The facility for local use 0 messages (16).";
reference reference
"RFC 5424: The Syslog Protocol"; "RFC 5424: The Syslog Protocol";
}
} identity local1 {
base syslog-facility;
description
"The facility for local use 1 messages (17).";
reference
"RFC 5424: The Syslog Protocol";
}
identity cron2 { identity local2 {
base syslog-facility; base syslog-facility;
description description
"The facility for the second clock daemon (15)."; "The facility for local use 2 messages (18).";
reference reference
"RFC 5424: The Syslog Protocol"; "RFC 5424: The Syslog Protocol";
} }
identity local0 { identity local3 {
base syslog-facility; base syslog-facility;
description description
"The facility for local use 0 messages (16)."; "The facility for local use 3 messages (19).";
reference reference
"RFC 5424: The Syslog Protocol"; "RFC 5424: The Syslog Protocol";
} }
identity local1 { identity local4 {
base syslog-facility; base syslog-facility;
description description
"The facility for local use 1 messages (17)."; "The facility for local use 4 messages (20).";
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 local2 { identity local6 {
base syslog-facility; base syslog-facility;
description description
"The facility for local use 2 messages (18)."; "The facility for local use 6 messages (22).";
reference reference
"RFC 5424: The Syslog Protocol"; "RFC 5424: The Syslog Protocol";
} }
identity local3 { identity local7 {
base syslog-facility; base syslog-facility;
description description
"The facility for local use 3 messages (19)."; "The facility for local use 7 messages (23).";
reference reference
"RFC 5424: The Syslog Protocol"; "RFC 5424: The Syslog Protocol";
} }
identity local4 { grouping severity-filter {
base syslog-facility; description
description "This grouping defines the processing used to select
"The facility for local use 4 messages (20)."; log messages by comparing syslog message severity using
reference the following processing rules:
"RFC 5424: The Syslog Protocol"; - if 'none', do not match.
} - 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 local5 { }
base syslog-facility; }
description default log;
"The facility for local use 5 messages (21)."; description
"The action can be used to spectify if the message should
be logged or blocked based on the outcome of the compare
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.";
}
}
reference grouping selector {
"RFC 5424: The Syslog Protocol"; description
} "This grouping defines a syslog selector which is used to
select log messages for the log-actions (console, file,
remote, etc.). Choose one or both of the following:
facility [<facility> <severity>...]
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 local6 { }
base syslog-facility; }
description }
"The facility for local use 6 messages (22)."; description
reference "The leaf uniquely identifies a syslog facility.";
"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";
}
}
identity local7 { grouping structured-data {
base syslog-facility; description
description "This grouping defines the syslog structured data option
"The facility for local use 7 messages (23)."; which is used to select the format used to write log
reference messages.";
"RFC 5424: The Syslog Protocol"; leaf structured-data {
} 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";
}
}
grouping severity-filter { container syslog {
description presence "Enables logging.";
"This grouping defines the processing used to select description
log messages by comparing syslog message severity using "This container describes the configuration parameters for
the following processing rules: syslog.";
- if 'none', do not match. container actions {
- if 'all', match. description
- else compare message severity with the specified severity "This container describes the log-action parameters
according to the default compare rule (all messages of the for syslog.";
specified severity and greater match) or if the container console {
select-adv-compare feature is present, the advance-compare if-feature console-action;
rule."; presence "Enables logging to the console";
leaf severity { description
type union { "This container describes the configuration parameters
type syslog-severity; for console logging.";
type enumeration { uses selector;
enum none { }
value 2147483647; container file {
description if-feature file-action;
"This enum describes the case where no severities description
are selected."; "This container describes the configuration parameters for
} file logging. If file-archive limits are not supplied, it
enum all { is assumed that the local implementation defined limits
value -2147483648; will be used.";
description list log-file {
"This enum describes the case where all severities key "name";
are selected."; description
} "This list describes a collection of local logging
} files.";
} leaf name {
mandatory true; type inet:uri {
description pattern 'file:.*';
"This leaf specifies the syslog message severity."; }
} description
container advanced-compare { "This leaf specifies the name of the log file which
when '../severity != "all" and MUST use the uri scheme file:.";
../severity != "none"' { }
description uses selector;
"The advanced compare container is not applicable for uses structured-data;
severity 'all' or severity 'none'"; container file-rotation {
} description
if-feature select-adv-compare; "This container describes the configuration
leaf compare { parameters for log file rotation.";
type enumeration { leaf number-of-files {
enum equals { if-feature file-limit-size;
description type uint32;
"This enum specifies that the severity comparison default 1;
operation will be equals."; description
} "This leaf specifies the maximum number of log
enum equals-or-higher { files retained. Specify 1 for implementations
description that only support one log file.";
"This enum specifies that the severity comparison }
operation will be equals or higher."; leaf max-file-size {
} if-feature file-limit-size;
} type uint32;
default equals-or-higher; units "megabytes";
description description
"The compare can be used to specify the comparison "This leaf specifies the maximum log file size.";
operator that should be used to compare the syslog message }
severity with the specified severity."; leaf rollover {
} if-feature file-limit-duration;
leaf action { type uint32;
type enumeration { units "minutes";
enum log { description
description "This leaf specifies the length of time that log
"This enum specifies that if the compare operation is events should be written to a specific log file.
true the message will be logged."; 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.";
}
} }
enum block {
description
"This enum specifies that if the compare operation is
true the message will not be logged.";
}
}
default log;
description
"The action can be used to spectify if the message should
be logged or blocked based on the outcome of the compare
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 { }
description case tls {
"This grouping defines a syslog selector which is used to container tls {
select log messages for the log-actions (console, file, description
remote, etc.). Choose one or both of the following: "This container describes the TLS transport
facility [<facility> <severity>...] options.";
pattern-match regular-expression-match-string reference
If both facility and pattern-match are specified, both must "RFC 5425: Transport Layer Security (TLS)
match in order for a log message to be selected."; Transport Mapping for Syslog ";
container facility-filter { leaf address {
description type inet:host;
"This container describes the syslog filter parameters."; description
list facility-list { "The leaf uniquely specifies the address of
key "facility severity"; the remote host. One of the following must be
ordered-by user; specified: an ipv4 address, an ipv6 address,
description or a host name.";
"This list describes a collection of syslog }
facilities and severities."; leaf port {
leaf facility { type inet:port-number;
type union { default 6514;
type identityref { description
base syslog-facility; "TCP port 6514 has been allocated as the default
} port for syslog over TLS.";
type enumeration { }
enum all { uses tlsc:tls-client-grouping;
description }
"This enum describes the case where all }
facilities are requested."; }
} uses selector;
} uses structured-data;
} leaf facility-override {
description type identityref {
"The leaf uniquely identifies a syslog facility."; base syslog-facility;
} }
uses severity-filter; description
} "If specified, this leaf specifies the facility used
} to override the facility in messages delivered to
leaf pattern-match { the remote server.";
if-feature select-match; }
type string; leaf source-interface {
description if-feature remote-source-interface;
"This leaf describes a Posix 1003.2 regular expression type if:interface-ref;
string that can be used to select a syslog message for description
logging. The match is performed on the SYSLOG-MSG field."; "This leaf sets the source interface to be used to
reference send messages to the remote syslog server. If not
"RFC 5424: The Syslog Protocol set, messages sent to a remote syslog server will
Std-1003.1-2008 Regular Expressions"; contain the IP address of the interface the syslog
} message uses to exit the network element";
}
grouping structured-data {
description
"This grouping defines the syslog structured data option
which is used to select the format used to write log
messages.";
leaf structured-data {
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 { }
presence "Enables logging."; container signing-options {
description if-feature signed-messages;
"This container describes the configuration parameters for presence
syslog."; "If present, syslog-signing options is activated.";
container actions { description
description "This container describes the configuration
"This container describes the log-action parameters parameters for signed syslog messages.";
for syslog."; reference
container console { "RFC 5848: Signed Syslog Messages";
if-feature console-action; container cert-signers {
presence "Enables logging to the console"; description
description "This container describes the signing certificate
"This container describes the configuration parameters configuration for Signature Group 0 which covers
for console logging."; the case for administrators who want all Signature
uses selector; Blocks to be sent to a single destination.";
} list cert-signer {
container file { key "name";
if-feature file-action; description
description "This list describes a collection of syslog
"This container describes the configuration parameters for message signers.";
file logging. If file-archive limits are not supplied, it leaf name {
is assumed that the local implementation defined limits type string;
will be used."; description
list log-file { "This leaf specifies the name of the syslog
key "name"; message signer.";
description }
"This list describes a collection of local logging container cert {
files."; uses ks:private-key-grouping;
leaf name { uses ks:certificate-grouping;
type inet:uri { description
pattern 'file:.*'; "This is the certificate that is periodically
} sent to the remote receiver. Selection of the
description certificate also implicitly selects the private
"This leaf specifies the name of the log file which key used to sign the syslog messages.";
MUST use the uri scheme file:."; }
} leaf hash-algorithm {
uses selector; type enumeration {
uses structured-data; enum SHA1 {
container file-rotation { value 1;
description description
"This container describes the configuration "This enum describes the SHA1 algorithm.";
parameters for log file rotation."; }
leaf number-of-files { enum SHA256 {
if-feature file-limit-size; value 2;
type uint32; description
default 1; "This enum describes the SHA256 algorithm.";
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.";
}
}
}
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-options {
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 certificate {
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.";
} }
} description
leaf cert-initial-repeat { "This leaf describes the syslog signer hash
type uint32; algorithm used.";
default 3; }
description }
"This leaf specifies the number of times each leaf cert-initial-repeat {
Certificate Block should be sent before the first type uint32;
message is sent."; default 3;
} description
leaf cert-resend-delay { "This leaf specifies the number of times each
type uint32; Certificate Block should be sent before the first
units "seconds"; message is sent.";
default 3600; }
description leaf cert-resend-delay {
"This leaf specifies the maximum time delay in type uint32;
seconds until resending the Certificate Block."; units "seconds";
} default 3600;
leaf cert-resend-count { description
type uint32; "This leaf specifies the maximum time delay in
default 0; seconds until resending the Certificate Block.";
description }
"This leaf specifies the maximum number of other leaf cert-resend-count {
syslog messages to send until resending the type uint32;
Certificate Block."; default 0;
} description
leaf sig-max-delay { "This leaf specifies the maximum number of other
type uint32; syslog messages to send until resending the
units "seconds"; Certificate Block.";
default 60; }
description leaf sig-max-delay {
"This leaf specifies when to generate a new type uint32;
Signature Block. If this many seconds have units "seconds";
elapsed since the message with the first message default 60;
number of the Signature Block was sent, a new description
Signature Block should be generated."; "This leaf specifies when to generate a new
} Signature Block. If this many seconds have
leaf sig-number-resends { elapsed since the message with the first message
type uint32; number of the Signature Block was sent, a new
default 0; Signature Block should be generated.";
description }
"This leaf specifies the number of times a leaf sig-number-resends {
Signature Block is resent. (It is recommended to type uint32;
select a value of greater than 0 in particular default 0;
when the UDP transport RFC 5426 is used.)."; description
} "This leaf specifies the number of times a
leaf sig-resend-delay { Signature Block is resent. (It is recommended to
type uint32; select a value of greater than 0 in particular
units "seconds"; when the UDP transport RFC 5426 is used.).";
default 5; }
description leaf sig-resend-delay {
"This leaf specifies when to send the next type uint32;
Signature Block transmission based on time. If units "seconds";
this many seconds have elapsed since the previous default 5;
sending of this Signature Block, resend it."; description
} "This leaf specifies when to send the next
leaf sig-resend-count { Signature Block transmission based on time. If
type uint32; this many seconds have elapsed since the previous
default 0; sending of this Signature Block, resend it.";
description }
"This leaf specifies when to send the next leaf sig-resend-count {
Signature Block transmission based on a count. type uint32;
If this many other syslog messages have been default 0;
sent since the previous sending of this description
Signature Block, resend it. A value of 0 means "This leaf specifies when to send the next
that you don't resend based on the number of Signature Block transmission based on a count.
messages."; 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> }
}
}
}
<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">
xmlns:syslog="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>
<severity>critical</severity> <severity>critical</severity>
</facility-list> </facility-list>
</facility-filter> </facility-filter>
</console> </console>
</actions> </actions>
</syslog> </syslog>
Enable remote logging of syslogs to udp destination Enable remote logging of syslogs to udp destination
2001:db8:a0b:12f0::1 for facility auth, severity error 2001:db8:a0b:12f0::1 for facility auth, severity error
<syslog xmlns="urn:ietf:params:xml:ns:yang:ietf-syslog" <syslog xmlns="urn:ietf:params:xml:ns:yang:ietf-syslog">
xmlns:syslog="urn:ietf:params:xml:ns:yang:ietf-syslog">
<actions> <actions>
<remote> <remote>
<destination> <destination>
<name>remote1</name> <name>remote1</name>
<udp> <udp>
<address>foo.eample.com</address> <address>foo.eample.com</address>
</udp> </udp>
<facility-filter> <facility-filter>
<facility-list> <facility-list>
<facility>auth</facility> <facility>auth</facility>
skipping to change at page 27, line 52 skipping to change at page 28, line 50
</actions> </actions>
</syslog> </syslog>
Figure 4. ietf-syslog Examples Figure 4. ietf-syslog Examples
6. Acknowledgements 6. Acknowledgements
The authors wish to thank the following who commented on this The authors wish to thank the following who commented on this
proposal: proposal:
Andy Bierman Andy Bierman, Martin Bjorklund, Alex Campbell, Alex Clemm, Jim
Gibson, Jeffrey Haas, John Heasley, Giles Heron, Lisa Huang, Mahesh
Martin Bjorklund Jethanandani, Jeffrey K Lange, Jan Lindblad, Chris Lonvick, Tom
Petch, Juergen Schoenwaelder, Phil Shafer, Jason Sterne, Peter Van
Alex Campbell Horne, Kent Watsen, Bert Wijnen, Dale R Worley, Aleksandr Zhdankin
Alex Clemm
Jim Gibson
Jeffrey Haas
John Heasley
Giles Heron
Lisa Huang
Mahesh Jethanandani
Jeffrey K Lange
Jan Lindblad
Chris Lonvick
Tom Petch
Juergen Schoenwaelder
Phil Shafer
Jason Sterne
Peter Van Horne
Kent Watsen
Bert Wijnen
Dale R Worley
Aleksandr Zhdankin
7. IANA Considerations 7. IANA Considerations
7.1. The IETF XML Registry
This document registers one URI in the IETF XML registry [RFC3688]. This document registers one URI in the IETF XML registry [RFC3688].
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 NETCONF WG of the IETF. 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.1. 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 the registry [RFC7895]/>. Following the format in [RFC7950]/>, the
following registration is requested: following 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
skipping to change at page 29, line 24 skipping to change at page 29, line 45
RESTCONF [RFC8040]. Both of these protocols have mandatory-to- RESTCONF [RFC8040]. Both of these protocols have mandatory-to-
implement secure transport layers (e.g., SSH, TLS) with mutual implement secure transport layers (e.g., SSH, TLS) with mutual
authentication. authentication.
The NETCONF access control model (NACM) [RFC6536] provides the means The NETCONF access control model (NACM) [RFC6536] provides the means
to restrict access for particular users to a pre-configured subset of to restrict access for particular users to a pre-configured subset of
all available protocol operations and content. all available protocol operations and content.
There are a number of data nodes defined in this YANG module that are There are a number of data nodes defined in this YANG module that are
writable/creatable/deletable (i.e., config true, which is the writable/creatable/deletable (i.e., config true, which is the
default). These data nodes may be considered sensitive or vulnerable default). These data nodes may be considered sensitive or vulnerable
in some network environments. Write operations (e.g., edit-config) in some network environments. Write operations (e.g., edit-config)
to these data nodes without proper protection can have a negative to these data nodes without proper protection can have a negative
effect on network operations. These are the subtrees and data nodes effect on network operations. These are the subtrees and data nodes
and their sensitivity/vulnerability: and their sensitivity/vulnerability:
facility-filter/pattern-match: When writing this node, facility-filter/pattern-match: When writing this node,
implementations MUST ensure that the regular expression pattern implementations MUST ensure that the regular expression pattern
match is not constructed to cause a regular expression denial match is not constructed to cause a regular expression denial
of service attack due to a pattern that causes the regular of service attack due to a pattern that causes the regular
expression implementation to work very slowly (exponentially expression implementation to work very slowly (exponentially
related to input size). related to input size).
Some of the readable data nodes in this YANG module may be considered Some of the readable data nodes in this YANG module may be considered
sensitive or vulnerable in some network environments. It is thus sensitive or vulnerable in some network environments. It is thus
important to control read access (e.g., via get, get-config, or important to control read access (e.g., via get, get-config, or
notification) to these data nodes. notification) to these data nodes.
There are no RPC operations defined in this YANG module. There are no RPC operations defined in this YANG module.
9. References 9. References
9.1. Normative References 9.1. Normative References
[I-D.ietf-netconf-keystore]
Watsen, K., "YANG Data Model for a "Keystore" Mechanism",
draft-ietf-netconf-keystore-04 (work in progress), October
2017.
[I-D.ietf-netconf-tls-client-server]
Watsen, K. and G. Wu, "YANG Groupings for TLS Clients and
TLS Servers", draft-ietf-netconf-tls-client-server-05
(work in progress), October 2017.
[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, DOI 10.17487/ Requirement Levels", BCP 14, RFC 2119,
RFC2119, March 1997, <http://www.rfc-editor.org/info/ DOI 10.17487/RFC2119, March 1997,
rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC5424] Gerhards, R., "The Syslog Protocol", RFC 5424, DOI [RFC5424] Gerhards, R., "The Syslog Protocol", RFC 5424,
10.17487/RFC5424, March 2009, <http://www.rfc-editor.org/ DOI 10.17487/RFC5424, March 2009,
info/rfc5424>. <https://www.rfc-editor.org/info/rfc5424>.
[RFC5425] Miao, F., Ed., Ma, Y.Ed., and J. Salowey, Ed., "Transport [RFC5425] Miao, F., Ed., Ma, Y., Ed., and J. Salowey, Ed.,
Layer Security (TLS) Transport Mapping for Syslog", RFC "Transport Layer Security (TLS) Transport Mapping for
5425, DOI 10.17487/RFC5425, March 2009, <https://www.rfc- Syslog", RFC 5425, DOI 10.17487/RFC5425, March 2009,
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, <http://www RFC 5426, DOI 10.17487/RFC5426, March 2009,
.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,
<http://www.rfc-editor.org/info/rfc5848>. <https://www.rfc-editor.org/info/rfc5848>.
[RFC6587] Gerhards, R. and C. Lonvick, "Transmission of Syslog [RFC6587] Gerhards, R. and C. Lonvick, "Transmission of Syslog
Messages over TCP", RFC 6587, DOI 10.17487/RFC6587, April Messages over TCP", RFC 6587, DOI 10.17487/RFC6587, April
2012, <http://www.rfc-editor.org/info/rfc6587>. 2012, <https://www.rfc-editor.org/info/rfc6587>.
[RFC6691] Borman, D., "TCP Options and Maximum Segment Size (MSS)",
RFC 6691, DOI 10.17487/RFC6691, July 2012, <https://www
.rfc-editor.org/info/rfc6691>.
[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,
<http://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,
<http://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, <http://www RFC 7950, DOI 10.17487/RFC7950, August 2016,
.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, <http://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
Open Group Base Specifications Issue 6, IEEE Std Open Group Base Specifications Issue 6, IEEE Std
1003.1-2008, 2016 Edition.", September 2016, <http:// 1003.1-2008, 2016 Edition.", September 2016,
pubs.opengroup.org/onlinepubs/9699919799/>. <http://pubs.opengroup.org/onlinepubs/9699919799/>.
[draft-ietf-netconf-keystore-04.txt]
Juniper Networks, "YANG Data Model for a "Keystore"
Mechanism draft-ietf-netconf-keystore-04", October 2017,
<https://tools.ietf.org/html/draft-ietf-netconf-
keystore-04>.
[draft-ietf-netconf-tls-client-server-05.txt]
Juniper Networks, Cisco Systems, "YANG Groupings for TLS
Clients and TLS Servers draft-ietf-netconf-tls-client-
server-05", October 2017, <https://tools.ietf.org/html/
draft-ietf-netconf-tls-client-server-05>.
9.2. Informative References 9.2. Informative References
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004, <http://www.rfc- DOI 10.17487/RFC3688, January 2004,
editor.org/info/rfc3688>. <https://www.rfc-editor.org/info/rfc3688>.
[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,
<http://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, DOI Protocol (NETCONF) Access Control Model", RFC 6536,
10.17487/RFC6536, March 2012, <https://www.rfc-editor.org/ DOI 10.17487/RFC6536, March 2012,
info/rfc6536>. <https://www.rfc-editor.org/info/rfc6536>.
[RFC8040] Bierman, A., Bjorklund, M. and K. Watsen, "RESTCONF [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
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
Appendix 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
syslog protocol as defined in [RFC5424] and hence such facilities syslog protocol as defined in [RFC5424] and hence such facilities
apply for local syslog-like logging functionality. apply for local syslog-like logging functionality.
The following is an example that shows how additional facilities The following is an example that shows how additional facilities
could be added to the list of available facilities (in this example could be added to the list of available facilities (in this example
two facilities are added): two facilities are added):
module vendor-syslog-types-example { module example-vendor-syslog-types {
namespace "urn:vendor:params:xml:ns:yang:vendor-syslog-types"; namespace "http://example.com/ns/vendor-syslog-types";
prefix vendor-syslogtypes; prefix vendor-syslogtypes;
import ietf-syslog { import ietf-syslog {
prefix syslogtypes; prefix syslogtypes;
} }
organization "Example, Inc."; organization "Example, Inc.";
contact contact
"Example, Inc. "Example, Inc.
Customer Service Customer Service
skipping to change at page 32, line 45 skipping to change at page 35, line 4
} }
identity vendor_specific_type_2 { identity vendor_specific_type_2 {
base syslogtypes:syslog-facility; base syslogtypes:syslog-facility;
description description
"Adding vendor specific type 2 to syslog-facility"; "Adding vendor specific type 2 to syslog-facility";
} }
} }
Authors' Addresses Authors' Addresses
Clyde Wildes (editor)
Clyde Wildes, editor
Cisco Systems Inc. Cisco Systems Inc.
170 West Tasman Drive 170 West Tasman Drive
San Jose, CA 95134 San Jose, CA 95134
US US
Phone: +1 408 527-2672 Phone: +1 408 527-2672
Email: cwildes@cisco.com EMail: cwildes@cisco.com
Kiran Koushik, editor
Kiran Koushik (editor)
Verizon Wireless Verizon Wireless
500 W Dove Rd. 500 W Dove Rd.
Southlake, TX 76092 Southlake, TX 76092
US US
Phone: +1 512 650-0210 Phone: +1 512 650-0210
Email: kirankoushik.agraharasreenivasa@verizonwireless.com EMail: kirankoushik.agraharasreenivasa@verizonwireless.com
 End of changes. 107 change blocks. 
1101 lines changed or deleted 1061 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/