draft-ietf-netmod-syslog-model-06.txt   draft-ietf-netmod-syslog-model-07.txt 
NETMOD WG Clyde Wildes
Internet-Draft Kiran Koushik
Intended status: Informational Cisco Systems Inc.
Expires: Jun 16, 2016 Dec 23, 2015
SYSLOG YANG model NETMOD WG C. Wildes, Ed.
draft-ietf-netmod-syslog-model-06 Internet-Draft K. Koushik, Ed.
Intended status: Standards Track Cisco Systems Inc.
Expires: September 21, 2016 March 20, 2016
SYSLOG YANG Model
draft-ietf-netmod-syslog-model-07
Abstract Abstract
This document describes a data model for Syslog This document describes a data model for the Syslog protocol which is
protocol which is used to convey event notification messages. used to convey event notification messages.
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 http://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 Jun 16, 2016. This Internet-Draft will expire on September 21, 2016.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2016 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
(http://trustee.ietf.org/license-info) in effect on the date of (http://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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3
2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 3 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 3
3. Design of the SYSLOG Model . . . . . . . . . . . . . . . . . 3 3. Design of the SYSLOG Model . . . . . . . . . . . . . . . . . 3
3.1. SYSLOG Module . . . . . . . . . . . . . . . . . . . . . . 4 3.1. SYSLOG Module . . . . . . . . . . . . . . . . . . . . . . 6
4. SYSLOG YANG Models . . . . . . . . . . . . . . . . . . . . . 6 4. SYSLOG YANG Models . . . . . . . . . . . . . . . . . . . . . 9
4.1. SYSLOG TYPES Module . . . . . . . . . . . . . . . . . . . 6 4.1. SYSLOG-TYPES Module . . . . . . . . . . . . . . . . . . . 9
4.2. SYSLOG module . . . . . . . . . . . . . . . . . . . . . . 10 4.2. Syslog Module . . . . . . . . . . . . . . . . . . . . . . 15
4.3. A SYSLOG Example . . . . . . . . . . . . . . . . . . . . 18 4.3. A Syslog Example . . . . . . . . . . . . . . . . . . . . 29
5. Implementation Status . . . . . . . . . . . . . . . . . . . . 19 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 31
6. Security Considerations . . . . . . . . . . . . . . . . . . . 19 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 7. Security Considerations . . . . . . . . . . . . . . . . . . . 32
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 20 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 32
9. Change log [RFC Editor: Please remove] . . . . . . . . . . . 20 8.1. Normative References . . . . . . . . . . . . . . . . . . 32
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 20 8.2. Informative References . . . . . . . . . . . . . . . . . 33
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 21 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 messages. is used for transmission and processing of the messages.
Since each process, application and operating system was Since each process, application and operating system was written
written somewhat independently, there is little uniformity to the somewhat independently, there is little uniformity to the content of
content of Syslog messages. For this reason, no assumption is made Syslog messages. For this reason, no assumption is made upon the
upon the formatting or contents of the messages. The protocol is formatting or contents of the messages. The protocol is simply
simply designed to transport these event messages. No designed to transport these event messages. No acknowledgement of
acknowledgement of the receipt is made. the receipt is made.
Essentially, a Syslog process receives messages (from the kernel, Essentially, a Syslog process receives messages (from the kernel,
processes, applications or other Syslog processes) and processes processes, applications or other Syslog processes) and processes
those. The processing involves logging to a local file, displaying on those. The processing involves logging to a local file, displaying
console, user terminal, and/or relaying to syslog processes on other on console, user terminal, and/or relaying to syslog processes on
machines. The processing is determined by the "facility" that other 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
draft. draft.
1.1. Definitions and Acronyms 1.1. Requirements Language
IP: Internet Protocol
IPv4: Internet Protocol version 4
IPv6: Internet Protocol version 6
UDP: User Datagram Protocol
VRF: Virtual Routing and Forwarding The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].
2. Problem Statement 2. Problem Statement
This document defines a YANG [RFC6020] configuration data model that This document defines a YANG [RFC6020] configuration data model that
may be used to monitor and control one or more syslog processes running may be used to monitor and control one or more syslog processes
on a system. YANG models can be used with network management running on a system. YANG models can be used with network management
agents such as NETCONF [RFC6241] to install, manipulate, and delete agents such as NETCONF [RFC6241] to install, manipulate, and delete
the configuration of network devices. the configuration of network devices.
This module makes use of the YANG "feature" construct which allows This module makes use of the YANG "feature" construct which allows
implementations to support only those Syslog features that lie implementations to support only those Syslog features that lie within
within their capabilities. their capabilities.
This module can be used to configure the SYSLOG application
conceptual layer [RFC5424].
3. Design of the SYSLOG Model 3. Design of the SYSLOG Model
The syslog model was designed by comparing various syslog features The syslog model was designed by comparing various syslog features
implemented by various vendors' in different implementations. implemented by various vendors' in different implementations.
This draft addresses the common leafs between all vendors and creates This draft addresses the common leafs between implementations and
a common model, which can be augmented with proprietary features, if creates a common model, which can be augmented with proprietary
necessary. The base model is designed to be very simple for maximum features, if necessary. The base model is designed to be very simple
flexibility. for maximum flexibility.
Syslog consists of message producers, a group level suppression filter, Many vendors extend the list of facilities available for logging in
and message distributors. The following digram shows syslog messages their implementation. Here is an example that shows how additional
flowing from a message producer, through the group level suppression facilities could be added to the list of available facilities (in
filter, and if passed by the group filter to message distributors where this case two facilities are added):
further suppression filtering can take place.
Message Producers module vendor-syslog-types {
+-------------+ +-------------+ +-------------+ +-------------+ namespace "urn:vendor:params:xml:ns:yang:vendor-syslog-types";
| Various | | OS | | | | Remote | prefix vendor-syslogtypes;
| Components | | Kernel | | Line Cards | | Servers |
+-------------+ +-------------+ +-------------+ +-------------+
+-------------+ +-------------+ +-------------+ +-------------+ import ietf-syslog-types {
| SNMP | | Interface | | Standby | | Syslog | prefix syslogtypes;
| Events | | Events | | Supervisor | | Itself | }
+-------------+ +-------------+ +-------------+ +-------------+
| | organization "Vendor, Inc.";
+----------------------------------------------------------------+ contact
| "Vendor, Inc.
| Customer Service
|
|
+-----------+------------+--------------+
| | | |
v v v |
Message Distributors |
+----------+ +----------+ +----------+ |
| | | Log | | Log | |
| Console | | Buffer(s)| | File(s) | |
+----------+ +----------+ +----------+ |
+-------------+-------------+
| | |
v v v
+-------------+ +-----------+ +-----------+ E-mail: syslog-yang@vendor.com";
|Remote | | | |User |
|Collectors(s)| |Terminal(s)| |Sessions(s)|
+-------------+ +-----------+ +-----------+
The leaves in the base syslog model correspond to the group level description
suppression filter and each message distributor: "This module contains a collection of vendor-sprecific YANG type
definitions for SYSLOG.";
- console revision 2016-03-20 {
- log buffer(s) description
- log file(s) "Version 1.0";
- remote collector(s) reference
- terminal(s) "Vendor SYSLOG Types: SYSLOG YANG Model";
- user session(s). }
Optional features are used to specified fields that are not present in identity vendor_specific_type_1 {
all vendor configurations. base syslogtypes:syslog-facility;
}
identity vendor_specific_type_2 {
base syslogtypes:syslog-facility;
}
}
Syslog consists of message originators, and message distributors.
The following digram shows syslog messages flowing from a message
originator, to message distributors where suppression filtering can
take place.
Message Originators
+-------------+ +-------------+ +-------------+ +-------------+
| Various | | OS | | | | Remote |
| Components | | Kernel | | Line Cards | | Servers |
+-------------+ +-------------+ +-------------+ +-------------+
+-------------+ +-------------+ +-------------+ +-------------+
| SNMP | | Interface | | Standby | | Syslog |
| Events | | Events | | Supervisor | | Itself |
+-------------+ +-------------+ +-------------+ +-------------+
| |
+----------------------------------------------------------------+
|
|
|
|
+-----------+------------+--------------+
| | | |
v v v |
Message Distributors |
+----------+ +----------+ +----------+ |
| | | Log | | Log | |
| Console | | Buffer(s)| | File(s) | |
+----------+ +----------+ +----------+ |
|
+-------------+-------------+
| | |
v v v
+----------------+ +-----------+ +-----------+
|Remote Relay(s)/| | | |User |
|Collectors(s) | |Terminal(s)| |Sessions(s)|
+----------------+ +-----------+ +-----------+
The leaves in the base syslog model log-actions container correspond
to each message distributor:
console
log buffer(s)
log file(s)
remote relay(s)/collector(s)
terminal(s)
user session(s).
Optional features are used to specified functionality that is present
in specific vendor configurations.
3.1. SYSLOG Module 3.1. SYSLOG Module
A simplified graphical representation of the complete data tree is A simplified graphical representation of the complete data tree is
presented here. presented here.
Each node is printed as: Each node is printed as:
<status> <flags> <name> <opts> <type> <if-features> <status> <flags> <name> <opts> <type> <if-features>
<status> is one of: <status> is one of:
+ for current
x for deprecated + for current
o for obsolete x for deprecated
o for obsolete
<flags> is one of: <flags> is one of:
rw for configuration data
ro for non-configuration data rw for configuration data
-x for rpcs ro for non-configuration data
-n for notifications -x for rpcs
-n for notifications
<name> is the name of the node <name> is the name of the node
(<name>) means that the node is a choice node
:(<name>) means that the node is a case node
If the node is augmented into the tree from another module, its (<name>) means that the node is a choice node
name is printed as <prefix>:<name>. :(<name>) means that the node is a case node
If the node is augmented into the tree from another module, its name
is printed as <prefix>:<name>.
<opts> is one of: <opts> is one of:
? for an optional leaf or choice
! for a presence container ? for an optional leaf or choice
* for a leaf-list or list ! for a presence container
[<keys>] for a list's keys * for a leaf-list or list
[<keys>] for a list's keys
<type> is the name of the type for leafs and leaf-lists <type> is the name of the type for leafs and leaf-lists
If the type is a leafref, the type is printed as "-> TARGET", where If the type is a leafref, the type is printed as "-> TARGET", where
TARGET is either the leafref path, with prefixed removed if possible. TARGET is either the leafref path, with prefixed removed if possible.
<if-features> is the list of features this node depends on, printed <if-features> is the list of features this node depends on, printed
within curly brackets and a question mark "{...}?" within curly brackets and a question mark "{...}?"
module: ietf-syslog module: ietf-syslog
+--rw syslog +--rw syslog
+--rw log-actions +--rw log-actions
+--rw console! +--rw console! {console-action}?
| +--rw log-selector | +--rw log-selector
| +--rw (selector-facility) | +--rw (selector-facility)
| | +--:(no-log-facility) | | +--:(no-log-facility)
| | | +--rw no-facilities? empty | | | +--rw no-facilities? empty
| | +--:(log-facility) | | +--:(log-facility)
| | +--rw log-facility* [facility] | | +--rw log-facility* [facility]
| | +--rw facility union | | +--rw facility union
| | +--rw severity union | | +--rw severity union
| | +--rw severity-operator? enumeration {selector-severity-operator-config}? | | +--rw severity-operator? enumeration {selector-sevop-config}?
| +--rw pattern-match? string {selector-match-processing-config}? | +--rw pattern-match? string {selector-match-config}?
+--rw buffer +--rw buffer {buffer-action}?
| +--rw log-buffer* [name] | +--rw log-buffer* [name]
| +--rw name string | +--rw name string
| +--rw log-selector | +--rw log-selector
| | +--rw (selector-facility) | | +--rw (selector-facility)
| | | +--:(no-log-facility) | | | +--:(no-log-facility)
| | | | +--rw no-facilities? empty | | | | +--rw no-facilities? empty
| | | +--:(log-facility) | | | +--:(log-facility)
| | | +--rw log-facility* [facility] | | | +--rw log-facility* [facility]
| | | +--rw facility union | | | +--rw facility union
| | | +--rw severity union | | | +--rw severity union
| | | +--rw severity-operator? enumeration {selector-severity-operator-config}? | | | +--rw severity-operator? enumeration {selector-sevop-config}?
| | +--rw pattern-match? string {selector-match-processing-config}? | | +--rw pattern-match? string {selector-match-config}?
| +--rw buffer-size-bytes? uint64 {buffer-limit-bytes}? | +--rw buffer-size-bytes? uint64 {buffer-limit-bytes}?
| +--rw buffer-size-messages? uint64 {buffer-limit-messages}? | +--rw buffer-size-messages? uint64 {buffer-limit-messages}?
| +--rw structured-data? boolean {structured-data-config}?
+--rw file +--rw file
| +--rw log-file* [name] | +--rw log-file* [name]
| +--rw name inet:uri | +--rw name inet:uri
| +--rw log-selector | +--rw log-selector
| | +--rw (selector-facility) | | +--rw (selector-facility)
| | | +--:(no-log-facility) | | | +--:(no-log-facility)
| | | | +--rw no-facilities? empty | | | | +--rw no-facilities? empty
| | | +--:(log-facility) | | | +--:(log-facility)
| | | +--rw log-facility* [facility] | | | +--rw log-facility* [facility]
| | | +--rw facility union | | | +--rw facility union
| | | +--rw severity union | | | +--rw severity union
| | | +--rw severity-operator? enumeration {selector-severity-operator-config}? | | | +--rw severity-operator? enumeration {selector-sevop-config}?
| | +--rw pattern-match? string {selector-match-processing-config}? | | +--rw pattern-match? string {selector-match-config}?
| +--rw structured-data? boolean {structured-data-config}? | +--rw structured-data? boolean {structured-data-config}?
| +--rw file-archive | +--rw file-archive
| +--rw number-of-files? uint32 {file-limit-size}? | +--rw number-of-files? uint32 {file-limit-size}?
| +--rw max-file-size? uint64 {file-limit-size}? | +--rw max-file-size? uint64 {file-limit-size}?
| +--rw rollover? uint32 {file-limit-duration}? | +--rw rollover? uint32 {file-limit-duration}?
| +--rw retention? uint16 {file-limit-duration}? | +--rw retention? uint16 {file-limit-duration}?
+--rw remote +--rw remote
| +--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 port? inet:port-number
| | +--:(tls)
| | +--rw tls
| | +--rw address? inet:host | | +--rw address? inet:host
| | +--rw port? inet:port-number | | +--rw port? inet:port-number
| +--rw log-selector | +--rw log-selector
| | +--rw (selector-facility) | | +--rw (selector-facility)
| | | +--:(no-log-facility) | | | +--:(no-log-facility)
| | | | +--rw no-facilities? empty | | | | +--rw no-facilities? empty
| | | +--:(log-facility) | | | +--:(log-facility)
| | | +--rw log-facility* [facility] | | | +--rw log-facility* [facility]
| | | +--rw facility union | | | +--rw facility union
| | | +--rw severity union | | | +--rw severity union
| | | +--rw severity-operator? enumeration {selector-severity-operator-config}? | | | +--rw severity-operator? enumeration {selector-sevop-config}?
| | +--rw pattern-match? string {selector-match-processing-config}? | | +--rw pattern-match? string {selector-match-config}?
| +--rw destination-facility? identityref | +--rw destination-facility? identityref
| +--rw source-interface? if:interface-ref | +--rw source-interface? if:interface-ref
| +--rw structured-data? boolean {structured-data-config}?
| +--rw syslog-sign! {signed-messages-config}? | +--rw syslog-sign! {signed-messages-config}?
| +--rw cert-initial-repeat uint16 | +--rw cert-initial-repeat uint16
| +--rw cert-resend-delay uint16 | +--rw cert-resend-delay uint16
| +--rw cert-resend-count uint16 | +--rw cert-resend-count uint16
| +--rw sig-max-delay uint16 | +--rw sig-max-delay uint16
| +--rw sig-number-resends uint16 | +--rw sig-number-resends uint16
| +--rw sig-resend-delay uint16 | +--rw sig-resend-delay uint16
| +--rw sig-resend-count uint16 | +--rw sig-resend-count uint16
+--rw terminal +--rw terminal {terminal-action}?
| +--rw (terminal-scope) | +--rw all-terminals!
| +--:(all-terminals) | | +--rw log-selector
| | +--rw all-terminals | | +--rw (selector-facility)
| | +--rw log-selector | | | +--:(no-log-facility)
| | +--rw (selector-facility) | | | | +--rw no-facilities? empty
| | | +--:(no-log-facility) | | | +--:(log-facility)
| | | | +--rw no-facilities? empty | | | +--rw log-facility* [facility]
| | | +--:(log-facility) | | | +--rw facility union
| | | +--rw log-facility* [facility] | | | +--rw severity union
| | | +--rw facility union | | | +--rw severity-operator? enumeration {selector-sevop-config}?
| | | +--rw severity union | | +--rw pattern-match? string {selector-match-config}?
| | | +--rw severity-operator? enumeration {selector-severity-operator-config}? | +--rw terminal* [name] {terminal-facility-user-logging-config}?
| | +--rw pattern-match? string {selector-match-processing-config}? | +--rw name string
| +--:(per-terminal) {terminal-facility-user-logging-config}? | +--rw log-selector
| +--rw device-name* [dname] | +--rw (selector-facility)
| +--rw dname string | | +--:(no-log-facility)
| +--rw log-selector | | | +--rw no-facilities? empty
| +--rw (selector-facility) | | +--:(log-facility)
| | +--:(no-log-facility) | | +--rw log-facility* [facility]
| | | +--rw no-facilities? empty | | +--rw facility union
| | +--:(log-facility) | | +--rw severity union
| | +--rw log-facility* [facility] | | +--rw severity-operator? enumeration {selector-sevop-config}?
| | +--rw facility union | +--rw pattern-match? string {selector-match-config}?
| | +--rw severity union +--rw session {session-action}?
| | +--rw severity-operator? enumeration {selector-severity-operator-config}? +--rw all-users!
| +--rw pattern-match? string {selector-match-processing-config}? | +--rw log-selector
+--rw session | +--rw (selector-facility)
+--rw (user-scope) | | +--:(no-log-facility)
+--:(all-users) | | | +--rw no-facilities? empty
| +--rw all-users | | +--:(log-facility)
| +--rw log-selector | | +--rw log-facility* [facility]
| +--rw (selector-facility) | | +--rw facility union
| | +--:(no-log-facility) | | +--rw severity union
| | | +--rw no-facilities? empty | | +--rw severity-operator? enumeration {selector-sevop-config}?
| | +--:(log-facility) | +--rw pattern-match? string {selector-match-config}?
| | +--rw log-facility* [facility] +--rw user* [name] {session-facility-user-logging-config}?
| | +--rw facility union +--rw name string
| | +--rw severity union +--rw log-selector
| | +--rw severity-operator? enumeration {selector-severity-operator-config}? +--rw (selector-facility)
| +--rw pattern-match? string {selector-match-processing-config}? | +--:(no-log-facility)
+--:(per-user) {session-facility-user-logging-config}? | | +--rw no-facilities? empty
+--rw user-name* [uname] | +--:(log-facility)
+--rw uname string | +--rw log-facility* [facility]
+--rw log-selector | +--rw facility union
+--rw (selector-facility) | +--rw severity union
| +--:(no-log-facility) | +--rw severity-operator? enumeration {selector-sevop-config}?
| | +--rw no-facilities? empty +--rw pattern-match? string {selector-match-config}?
| +--:(log-facility)
| +--rw log-facility* [facility]
| +--rw facility union
| +--rw severity union
| +--rw severity-operator? enumeration {selector-severity-operator-config}?
+--rw pattern-match? string {selector-match-processing-config}?
4. SYSLOG YANG Models 4. SYSLOG YANG Models
4.1. SYSLOG-TYPES module 4.1. SYSLOG-TYPES Module
<CODE BEGINS> file "ietf-syslog-types.yang" <CODE BEGINS> file "ietf-syslog-types.yang"
module ietf-syslog-types { module ietf-syslog-types {
namespace "urn:ietf:params:xml:ns:yang:ietf-syslog-types"; namespace "urn:ietf:params:xml:ns:yang:ietf-syslog-types";
prefix syslogtypes; prefix syslogtypes;
organization "IETF NETMOD (NETCONF Data Modeling Language) Working organization "IETF NETMOD (NETCONF Data Modeling Language) Working
Group"; 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>
WG Chair: Tom Nadeau WG Chair: Lou Berger
<mailto:tnadeau@lucidvision.com> <mailto:lberger@labn.net>
WG Chair: Jurgen Schonwalder
<mailto:j.schoenwaelder@jacobs-university.de>
WG Chair: Kent Watsen WG Chair: Kent Watsen
<mailto:kwatsen@juniper.net> <mailto:kwatsen@juniper.net>
Editor: Ladislav Lhotka Editor: Kiran Agrahara Sreenivasa
<mailto:lhotka@nic.cz>"; <mailto:kkoushik@cisco.com>
Editor: Clyde Wildes
<mailto:cwildes@cisco.com>";
description description
"This module contains a collection of YANG type definitions for "This module contains a collection of YANG type definitions for
SYSLOG."; SYSLOG.
revision 2015-11-09 { Copyright (c) 2015 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
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
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
'OPTIONAL' in the module text are to be interpreted as described
in RFC 2119 (http://tools.ietf.org/html/rfc2119).
This version of this YANG module is part of RFC XXXX
(http://tools.ietf.org/html/rfcXXXX); see the RFC itself for
full legal notices.";
reference
"RFC 5424: The Syslog Protocol";
revision 2016-03-20{
description description
"Initial Revision"; "Initial Revision";
reference reference
"This model references RFC 5424 - The Syslog Protocol, "RFC XXXX: SYSLOG YANG Model";
and RFC 5848 - Signed Syslog Messages.";
} }
typedef severity { typedef severity {
type enumeration { type enumeration {
enum "emergency" { enum "emergency" {
value 0; value 0;
description description
"Emergency Level Msg"; "Emergency Level Msg";
} }
enum "alert" { enum "alert" {
skipping to change at page 7, line 28 skipping to change at page 12, line 4
} }
enum "debug" { enum "debug" {
value 7; value 7;
description description
"Debugging Level Msg"; "Debugging Level Msg";
} }
} }
description description
"The definitions for Syslog message severity as per RFC 5424."; "The definitions for Syslog message severity as per RFC 5424.";
} }
identity syslog-facility { identity syslog-facility {
description description
"The base identity to represent syslog facilities"; "This identity is used as a base for all syslog facilities as
per RFC 5424.";
} }
identity kern { identity kern {
base syslog-facility; base syslog-facility;
description description
"The facility for kernel messages as defined in RFC 5424."; "The facility for kernel messages (0) as defined in RFC 5424.";
} }
identity user { identity user {
base syslog-facility; base syslog-facility;
description description
"The facility for user-level messages as defined in RFC 5424."; "The facility for user-level messages (1) as defined in RFC 5424.";
} }
identity mail { identity mail {
base syslog-facility; base syslog-facility;
description description
"The facility for the mail system as defined in RFC 5424."; "The facility for the mail system (2) as defined in RFC 5424.";
} }
identity daemon { identity daemon {
base syslog-facility; base syslog-facility;
description description
"The facility for the system daemons as defined in RFC 5424."; "The facility for the system daemons (3) as defined in RFC 5424.";
} }
identity auth { identity auth {
base syslog-facility; base syslog-facility;
description description
"The facility for security/authorization messages as defined "The facility for security/authorization messages (4) as defined
in RFC 5424."; in RFC 5424.";
} }
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 as defined in RFC 5424."; facility (5)as defined in RFC 5424.";
} }
identity lpr { identity lpr {
base syslog-facility; base syslog-facility;
description description
"The facility for the line printer subsystem as defined in "The facility for the line printer subsystem (6) as defined in
RFC 5424."; RFC 5424.";
} }
identity news { identity news {
base syslog-facility; base syslog-facility;
description description
"The facility for the network news subsystem as defined in "The facility for the network news subsystem (7) as defined in
RFC 5424."; RFC 5424.";
} }
identity uucp { identity uucp {
base syslog-facility; base syslog-facility;
description description
"The facility for the UUCP subsystem as defined in RFC 5424."; "The facility for the UUCP subsystem (8) as defined in RFC 5424.";
} }
identity cron { identity cron {
base syslog-facility; base syslog-facility;
description description
"The facility for the clock daemon as defined in RFC 5424."; "The facility for the clock daemon (9) as defined in RFC 5424.";
} }
identity authpriv { identity authpriv {
base syslog-facility; base syslog-facility;
description description
"The facility for privileged security/authorization messages "The facility for privileged security/authorization messages (10)
as defined in RFC 5424."; as defined in RFC 5424.";
} }
identity ftp { identity ftp {
base syslog-facility; base syslog-facility;
description description
"The facility for the FTP daemon as defined in RFC 5424."; "The facility for the FTP daemon (11) as defined in RFC 5424.";
} }
identity ntp { identity ntp {
base syslog-facility; base syslog-facility;
description description
"The facility for the NTP subsystem as defined in RFC 5424."; "The facility for the NTP subsystem (12) as defined in RFC 5424.";
} }
identity audit { identity audit {
base syslog-facility; base syslog-facility;
description description
"The facility for log audit messages as defined in RFC 5424."; "The facility for log audit messages (13) as defined in RFC 5424.";
} }
identity console { identity console {
base syslog-facility; base syslog-facility;
description description
"The facility for log alert messages as defined in RFC 5424."; "The facility for log alert messages (14) as defined in RFC 5424.";
} }
identity cron2 { identity cron2 {
base syslog-facility; base syslog-facility;
description description
"The facility for the second clock daemon as defined in "The facility for the second clock daemon (15) as defined in
RFC 5424."; RFC 5424.";
} }
identity local0 { identity local0 {
base syslog-facility; base syslog-facility;
description description
"The facility for local use 0 messages as defined in "The facility for local use 0 messages (16) as defined in
RFC 5424."; RFC 5424.";
} }
identity local1 { identity local1 {
base syslog-facility; base syslog-facility;
description description
"The facility for local use 1 messages as defined in "The facility for local use 1 messages (17) as defined in
RFC 5424."; RFC 5424.";
} }
identity local2 { identity local2 {
base syslog-facility; base syslog-facility;
description description
"The facility for local use 2 messages as defined in "The facility for local use 2 messages (18) as defined in
RFC 5424."; RFC 5424.";
} }
identity local3 { identity local3 {
base syslog-facility; base syslog-facility;
description description
"The facility for local use 3 messages as defined in "The facility for local use 3 messages (19) as defined in
RFC 5424."; RFC 5424.";
} }
identity local4 { identity local4 {
base syslog-facility; base syslog-facility;
description description
"The facility for local use 4 messages as defined in "The facility for local use 4 messages (20) as defined in
RFC 5424."; RFC 5424.";
} }
identity local5 { identity local5 {
base syslog-facility; base syslog-facility;
description description
"The facility for local use 5 messages as defined in "The facility for local use 5 messages (21) as defined in
RFC 5424."; RFC 5424.";
} }
identity local6 { identity local6 {
base syslog-facility; base syslog-facility;
description description
"The facility for local use 6 messages as defined in "The facility for local use 6 messages (22) as defined in
RFC 5424."; RFC 5424.";
} }
identity local7 { identity local7 {
base syslog-facility; base syslog-facility;
description description
"The facility for local use 7 messages as defined in "The facility for local use 7 messages (23) as defined in
RFC 5424."; RFC 5424.";
} }
} }
<CODE ENDS> <CODE ENDS>
4.2. SYSLOG module
4.2. Syslog Module
<CODE BEGINS> file "ietf-syslog.yang" <CODE BEGINS> file "ietf-syslog.yang"
module ietf-syslog { module ietf-syslog {
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;
} }
skipping to change at page 10, line 29 skipping to change at page 15, line 51
import ietf-syslog-types { import ietf-syslog-types {
prefix syslogtypes; prefix syslogtypes;
} }
organization "IETF NETMOD (NETCONF Data Modeling Language) organization "IETF NETMOD (NETCONF Data Modeling Language)
Working Group"; 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>
WG Chair: Tom Nadeau WG Chair: Lou Berger
<mailto:tnadeau@lucidvision.com> <mailto:lberger@labn.net>
WG Chair: Jurgen Schonwalder
<mailto:j.schoenwaelder@jacobs-university.de>
WG Chair: Kent Watsen WG Chair: Kent Watsen
<mailto:kwatsen@juniper.net> <mailto:kwatsen@juniper.net>
Editor: Ladislav Lhotka Editor: Kiran Agrahara Sreenivasa
<mailto:lhotka@nic.cz>"; <mailto:kkoushik@cisco.com>
Editor: Clyde Wildes
<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.
revision 2015-11-09 { Copyright (c) 2015 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
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
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
'OPTIONAL' in the module text are to be interpreted as described
in RFC 2119 (http://tools.ietf.org/html/rfc2119).
This version of this YANG module is part of RFC XXXX
(http://tools.ietf.org/html/rfcXXXX); see the RFC itself for
full legal notices.";
reference
"RFC 5424: The Syslog Protocol
RFC 5848: Signed Syslog Messages";
revision 2016-03-20{
description description
"Initial Revision"; "Initial Revision";
reference reference
"RFC 5424: The Syslog Protocol "RFC XXXX: SYSLOG YANG Model";
RFC 5848: Signed Syslog Messages"; }
feature console-action {
description
"This feature indicates that logging to the console is
supported.";
}
feature buffer-action {
description
"This feature indicates that logging to an in-memory
buffer is supported.";
} }
feature buffer-limit-bytes { feature buffer-limit-bytes {
description description
"This feature indicates that local memory logging buffers "This feature indicates that local memory logging buffers
are limited in size using a limit expressed in bytes."; are limited in size using a limit expressed in bytes.";
} }
feature buffer-limit-messages { feature buffer-limit-messages {
description description
"This feature indicates that local memory logging buffers "This feature indicates that local memory logging buffers
are limited in size using a limit expressed in number are limited in size using a limit expressed in number
of messages."; of messages.";
} }
feature structured-data-config {
description
"This feature represents the ability to log messages
in structured-data format as per RFC 5424.";
}
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 terminal-action {
description
"This feature indicates that logging to a terminal
is supported.";
}
feature terminal-facility-user-logging-config { feature terminal-facility-user-logging-config {
description description
"This feature represents the ability to adjust "This feature represents the ability to adjust
log message settings for individual terminal log message settings for individual terminal
devices."; devices.";
} }
feature session-action {
description
"This feature indicates that logging to user
CLI session is supported.";
}
feature session-facility-user-logging-config { feature session-facility-user-logging-config {
description description
"This feature represents the ability to adjust "This feature represents the ability to adjust
log message settings for individual user sessions."; log message settings for individual user CLI
sessions.";
} }
feature selector-severity-operator-config { feature selector-sevop-config {
description description
"This feature represents the ability to select messages "This feature represents the ability to select messages
using the additional operators equal to, or not equal to using the additional operators equal to, or not equal to
when comparing the Syslog message severity."; when comparing the Syslog message severity.";
} }
feature selector-match-processing-config { feature selector-match-config {
description description
"This feature represents the ability to select messages based "This feature represents the ability to select messages based
on a Posix 1003.2 regular expression pattern match."; on a Posix 1003.2 regular expression pattern match.";
} }
feature structured-data-config {
description
"This feature represents the ability to log messages
in structured-data format as per RFC 5424.";
}
feature signed-messages-config { feature signed-messages-config {
description description
"This feature represents the ability to configure signed "This feature represents the ability to configure signed
syslog messages according to RFC 5848."; syslog messages according to RFC 5848.";
} }
grouping syslog-severity { grouping syslog-severity {
description description
"This grouping defines the Syslog severity which is used to "This grouping defines the Syslog severity which is used to
select log messages."; select log messages.";
leaf severity { leaf severity {
type union { type union {
type syslogtypes:severity; type syslogtypes:severity;
type enumeration { type enumeration {
enum all { enum all {
value -1; value -1;
description description
"This enum describes the case where all severities "This enum describes the case where all severities
are requested."; are selected.";
} }
enum none { enum none {
value -2; value -2;
description description
"This enum describes the case where no severities "This enum describes the case where no severities
are requested."; are selected.";
} }
} }
} }
mandatory true; mandatory true;
description description
"This leaf specifies the Syslog message severity. When "This leaf specifies the Syslog message severity. When
severity is specified, the default severity comparison severity is specified, the default severity comparison
is all messages of the specified severity and greater are is all messages of the specified severity and greater are
logged. 'all' is a special case which means all severities selected. 'all' is a special case which means all severities
are requested. 'none' is a special case which means that are selected. 'none' is a special case which means that
no severity selection should occur."; no selection should occur or disable this filter.";
} }
leaf severity-operator { leaf severity-operator {
if-feature selector-severity-operator-config; when '../severity != "all" and
../severity != "none"' {
description
"The severity-operator is not applicable for severity 'all' or
severity 'none'";
}
if-feature selector-sevop-config;
type enumeration { type enumeration {
enum equals-or-higher { enum equals-or-higher {
description description
"This enum specifies all messages of the specified "This enum specifies all messages of the specified
severity and higher are logged according to the severity and higher are logged according to the
given log-action"; given log-action";
} }
enum equals { enum equals {
description description
"This enum specifies all messages that are for "This enum specifies all messages that are for
skipping to change at page 13, line 34 skipping to change at page 21, line 24
} }
} }
description description
"The leaf uniquely identifies a Syslog facility."; "The leaf uniquely identifies a Syslog facility.";
} }
uses syslog-severity; uses syslog-severity;
} }
} }
} }
leaf pattern-match { leaf pattern-match {
if-feature selector-match-processing-config; if-feature selector-match-config;
type string; type string;
description description
"This leaf desribes a Posix 1003.2 regular expression "This leaf desribes a Posix 1003.2 regular expression
string that can be used to select a Syslog message for string that can be used to select a Syslog message for
logging. The match is performed on the RFC 5424 logging. The match is performed on the RFC 5424
SYSLOG-MSG field."; SYSLOG-MSG field.";
} }
} }
} }
grouping syslog-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-config;
type boolean;
default false;
description
"This leaf describes how log messages are written to
the log file. If true, messages will be written
with one or more STRUCTURED-DATA elements as per
RFC5424; if false, messages will be written with
STRUCTURED-DATA = NILVALUE.";
}
}
container syslog { container syslog {
description description
"This container describes the configuration parameters for "This container describes the configuration parameters for
Syslog."; Syslog.";
container log-actions { container log-actions {
description description
"This container describes the log-action parameters "This container describes the log-action parameters
for Syslog."; for Syslog.";
container console { container console {
if-feature console-action;
presence "Enables logging console configuration"; presence "Enables logging console configuration";
description description
"This container describes the configuration parameters for "This container describes the configuration parameters for
console logging."; console logging.";
uses syslog-selector; uses syslog-selector;
} }
container buffer { container buffer {
if-feature buffer-action;
description description
"This container describes the configuration parameters for "This container describes the configuration parameters for
local memory buffer logging. The buffer is circular in local memory buffer logging. The buffer is circular in
nature, so newer messages overwrite older messages after nature, so newer messages overwrite older messages after
the buffer is filled."; the buffer is filled. The method used to read syslog messages
from the buffer is supplied by the local implementation.";
list log-buffer { list log-buffer {
key name; key name;
description description
"This list describes a collection of local logging "This list describes a collection of local logging
memory buffers."; memory buffers. If buffer size limits are not supplied, it
is assumed that the local implementation defined
limits will be used.";
leaf name { leaf name {
type string; type string;
description description
"This leaf specifies the name of the log buffer."; "This leaf specifies the name of the log buffer.";
} }
uses syslog-selector; uses syslog-selector;
leaf buffer-size-bytes { leaf buffer-size-bytes {
if-feature buffer-limit-bytes; if-feature buffer-limit-bytes;
type uint64; type uint64;
units "bytes"; units "bytes";
description description
"This leaf configures the amount of memory "This leaf configures the amount of memory (in bytes) that
(in bytes) that will be dedicated to the local will be dedicated to the local memory logging buffer.
memory logging buffer. The default value varies The default value varies by implementation.";
by implementation.";
} }
leaf buffer-size-messages { leaf buffer-size-messages {
if-feature buffer-limit-messages; if-feature buffer-limit-messages;
type uint64; type uint64;
units "log messages"; units "log messages";
description description
"This leaf configures the amount number of log "This leaf configures the amount number of log messages that
messages that can be stored in the local memory can be stored in the local memory logging buffer. The
logging buffer. The default value varies by default value varies by implementation.";
implementation.";
} }
uses syslog-structured-data;
} }
} }
container file { container file {
description description
"This container describes the configuration parameters for "This container describes the configuration parameters for
file logging."; file logging. If file-archive limits are not supplied, it
is assumed that the local implementation defined limits will
be used.";
list log-file { list log-file {
key "name"; key "name";
description description
"This list describes a collection of local logging "This list describes a collection of local logging
files."; files.";
leaf name { leaf name {
type inet:uri; type inet:uri {
pattern 'file:.*';
}
description description
"This leaf specifies the name of the log file which "This leaf specifies the name of the log file which
MUST use the uri scheme file:."; MUST use the uri scheme file:.";
} }
uses syslog-selector; uses syslog-selector;
leaf structured-data { uses syslog-structured-data;
if-feature structured-data-config;
type boolean;
default false;
description
"This leaf describes how log messages are written to
the log file. If true, messages will be written
with one or more STRUCTURED-DATA elements as per
RFC5424; if false, messages will be written with
STRUCTURED-DATA = NILVALUE.";
}
container file-archive { container file-archive {
description description
"This container describes the configuration "This container describes the configuration
parameters for log file archiving."; parameters for log file archiving.";
leaf number-of-files { leaf number-of-files {
if-feature file-limit-size; if-feature file-limit-size;
type uint32; type uint32;
description description
"This leaf specifies the maximum number of log "This leaf specifies the maximum number of log
files retained. Specify 1 for implementations files retained. Specify 1 for implementations
skipping to change at page 16, line 27 skipping to change at page 25, line 4
} }
choice transport { choice transport {
mandatory true; mandatory true;
description description
"This choice describes the transport option."; "This choice describes the transport option.";
case tcp { case tcp {
container tcp { container tcp {
description description
"This container describes the TCP transport "This container describes the TCP transport
options."; options.";
reference
"RFC 6587: Transmission of Syslog Messages over TCP";
leaf address { leaf address {
type inet:host; type inet:host;
description description
"The leaf uniquely specifies the address of "The leaf uniquely specifies the address of
the remote host. One of the following must the remote host. One of the following must
be specified: an ipv4 address, an ipv6 be specified: an ipv4 address, an ipv6
address, or a host name."; address, or a host name.";
} }
leaf port { leaf port {
type inet:port-number; type inet:port-number;
skipping to change at page 16, line 49 skipping to change at page 25, line 29
"This leaf specifies the port number used to "This leaf specifies the port number used to
deliver messages to the remote server."; deliver messages to the remote server.";
} }
} }
} }
case udp { case udp {
container udp { container udp {
description description
"This container describes the UDP transport "This container describes the UDP transport
options."; options.";
reference
"RFC 5426: Transmission of Syslog Messages over UDP";
leaf address { leaf address {
type inet:host; type inet:host;
description description
"The leaf uniquely specifies the address of "The leaf uniquely specifies the address of
the remote host. One of the following must be the remote host. One of the following must be
specified: an ipv4 address, an ipv6 address, specified: an ipv4 address, an ipv6 address,
or a host name."; or a host name.";
} }
leaf port { leaf port {
type inet:port-number; type inet:port-number;
default 514; default 514;
description description
"This leaf specifies the port number used to "This leaf specifies the port number used to
deliver messages to the remote server."; 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
"This leaf specifies the port number used to
deliver messages to the remote server.";
}
}
}
} }
uses syslog-selector; uses syslog-selector;
leaf destination-facility { leaf destination-facility {
type identityref { type identityref {
base syslogtypes:syslog-facility; base syslogtypes:syslog-facility;
} }
default syslogtypes:local7; default syslogtypes:local7;
description description
"This leaf specifies the facility used in messages "This leaf specifies the facility used in messages
delivered to the remote server."; delivered to the remote server.";
skipping to change at page 17, line 24 skipping to change at page 26, line 44
leaf source-interface { leaf source-interface {
type if:interface-ref; type if:interface-ref;
description description
"This leaf sets the source interface for the remote "This leaf sets the source interface for the remote
Syslog server. Either the interface name or the Syslog server. Either the interface name or the
interface IP address can be specified. If not set, interface IP address can be specified. If not set,
messages sent to a remote syslog server will messages sent to a remote syslog server will
contain the IP address of the interface the syslog contain the IP address of the interface the syslog
message uses to exit the network element"; message uses to exit the network element";
} }
uses syslog-structured-data;
container syslog-sign { container syslog-sign {
if-feature signed-messages-config; if-feature signed-messages-config;
presence presence
"If present, syslog-sign is activated."; "If present, syslog-sign is activated.";
description description
"This container describes the configuration "This container describes the configuration
parameters for signed syslog messages as described parameters for signed syslog messages as described
by RFC 5848."; by RFC 5848.";
reference reference
"RFC 5848: Signed Syslog Messages"; "RFC 5848: Signed Syslog Messages";
skipping to change at page 18, line 36 skipping to change at page 28, line 24
"This leaf specifies when to send the next "This leaf specifies when to send the next
Signature Block transmission based on a count. Signature Block transmission based on a count.
If this many other syslog messages have been sent If this many other syslog messages have been sent
since the previous sending of this Signature since the previous sending of this Signature
Block, resend it."; Block, resend it.";
} }
} }
} }
} }
container terminal { container terminal {
if-feature terminal-action;
description description
"This container describes the configuration parameters for "This container describes the configuration parameters for
the terminal logging configuration."; the terminal logging configuration.";
choice terminal-scope { container all-terminals {
mandatory true; presence "Enables logging to all terminals.";
description description
"This choice describes the option to specify all "This container describes the configuration
terminals or a specific terminal. The all terminals parameters for all terminals.";
case implies that messages will be sent to all uses syslog-selector;
sessions on that terminal"; }
case all-terminals { list terminal {
description if-feature terminal-facility-user-logging-config;
"This case specifies all terminals."; key "name";
container all-terminals { description
description "This list describes a collection of ";
"This container describes the configuration leaf name {
parameters for all terminals."; type string;
uses syslog-selector;
}
}
case per-terminal {
if-feature terminal-facility-user-logging-config;
description description
"This case specifies one or more terminals."; "This leaf uniquely describes a terminal which
list device-name { will receive log messages.";
key "dname";
description
"This list describes a collection of device names.";
leaf dname {
type string;
description
"This leaf uniquely describes a device name which
is the device to receive log messages.";
}
uses syslog-selector;
}
} }
uses syslog-selector;
} }
} }
container session { container session {
if-feature session-action;
description description
"This container describes the configuration parameters for "This container describes the configuration parameters for
session logging configuration."; user CLI session logging configuration.";
choice user-scope { container all-users {
mandatory true; presence "Enables logging to all user sessions.";
description description
"This choice describes the option to specify all users "This container describes the configuration
or a specific user. The all users case implies that parameters for all users.";
messages will be sent to all sessions"; uses syslog-selector;
case all-users { }
description list user {
"This case specifies all users."; if-feature session-facility-user-logging-config;
container all-users { key "name";
description description
"This container describes the configuration "This list describes a collection of user names.";
parameters for all users."; leaf name {
uses syslog-selector; type string;
}
}
case per-user {
if-feature session-facility-user-logging-config;
description description
"This case specifies a specific user."; "This leaf uniquely describes a user name which
list user-name { is the login name of the user whose session
key "uname"; is to receive log messages.";
description
"This list describes a collection of user names.";
leaf uname {
type string;
description
"This leaf uniquely describes a user name which
is the login name of the user whose session
is to receive log messages.";
}
uses syslog-selector;
}
} }
uses syslog-selector;
} }
} }
} }
} }
} }
<CODE ENDS> <CODE ENDS>
4.3. A SYSLOG Example 4.3. A Syslog Example
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:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config> <edit-config>
<target> <target>
<candidate/> <candidate/>
</target> </target>
skipping to change at page 19, line 37 skipping to change at page 31, line 4
<severity>error</severity> <severity>error</severity>
</log-facility> </log-facility>
</log-selector> </log-selector>
</destination> </destination>
</remote> </remote>
</log-actions> </log-actions>
</syslog> </syslog>
</config> </config>
</edit-config> </edit-config>
</rpc> </rpc>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/> <ok/>
</rpc-reply> </rpc-reply>
5. Implementation Status 5. Acknowledgements
[Note to RFC Editor: Please remove this section before publication.]
This section records the status of known implementations of the Syslog
YANG model at the time of posting of this Internet-Draft.
Cisco Systems, Inc. has implemented the proposed IETF Syslog model
for the Nexus 7000 NXOS OS as a prototype, together with an
augmentation model for operating system specific Syslog configuration
features.
Five leaves were implemented in the base IETF model and three leaves The authors wish to thank the following who commented on versions 01
were implemented in the Cisco specific augmentation model as follows: through 06 of this proposal:
Leaf XPATH Sample NXOS CLI Command(s) Martin Bjorklund <mbjorklu@cisco.com>
Jim Gibson <gibson@cisco.com>
Jeffrey Haas <jhaas@pfrc.org>
John Heasley <heas@shrubbery.net>
Giles Heron <giheron@cisco.com>
Lisa Huang <yihuan@cisco.com>
Jeffrey K Lange <jeffrey.K.lange@ge.com>
Jan Lindblad <jlindbla@cisco.com>
Chris Lonvick <lonvick@gmail.com>
Tom Petch <ietfc@btconnect.com>
Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Jason Sterne <jason.sterne@alcatel-lucent.com>
Peter Van Horne <petervh@cisco.com>
Bert Wijnen <bertietf@bwijnen.net>
Aleksandr Zhdankin <azhdanki@cisco.com>
syslog:log-actions/console logging console 1 6. IANA Considerations
syslog:log-actions/file logging logfile mylog.log 2 4096
syslog:log-actions/terminal logging monitor 2
syslog:log-actions/remote *logging server server.cisco.com 2
facility user
*logging source-interface loopback 0
cisco-syslog:logging-timestamp-config logging timestamp milli-seconds
cisco-syslog:origin-id-cfg logging origin-id string abcdef
cisco-syslog:module-logging logging module 1
*The "logging server" and "logging source-interface" commands were This document registers two URIs in the IETF XML registry [RFC3688].
combined into one base model leaf.
The description of implementations in this section is intended to assist Following the format in RFC 3688, the following registration is
the IETF in its decision processes in progressing drafts to RFCs. requested to be made:
6. Security Considerations URI: urn:ietf:params:xml:ns:yang:ietf-syslog-types
The YANG module defined in this memo is designed to be accessed via Registrant Contact: The IESG.
the NETCONF protocol [RFC6241] [RFC6241]. The lowest NETCONF layer
is the secure transport layer and the mandatory-to-implement secure
transport is SSH [RFC6242] [RFC6242]. The NETCONF access control
model [RFC6536] [RFC6536] provides the means to restrict access for
particular NETCONF users to a pre-configured subset of all available
NETCONF protocol operations and content.
There are a number of data nodes defined in the YANG module which are XML: N/A, the requested URI is an XML namespace.
writable/creatable/deletable (i.e., config true, which is the
default). These data nodes may be considered sensitive or vulnerable
in some network environments. Write operations (e.g., <edit-config>)
to these data nodes without proper protection can have a negative
effect on network operations.
TBD: List specific Subtrees and data nodes and their sensitivity/ This document registers a YANG module in the YANG Module Names
vulnerability. registry [RFC6020].
7. IANA Considerations name: ietf-syslog-types namespace: urn:ietf:params:xml:ns:yang:ietf-
syslog-types
This document registers a URI in the IETF XML registry [RFC3688] prefix: ietf-syslog-types reference: RFC XXXX
[RFC3688]. Following the format in RFC 3688, the following Following the format in RFC 3688, the following registration is
registration is requested to be made: requested to be made:
URI: urn:ietf:params:xml:ns:yang: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.
This document registers a YANG module in the YANG Module Names This document registers a YANG module in the YANG Module Names
registry [RFC6020]. registry [RFC6020].
name: syslog namespace: urn:ietf:params:xml:ns:yang:syslog name: ietf-syslog namespace: urn:ietf:params:xml:ns:yang:ietf-syslog
prefix: syslog reference: RFC XXXX
8. Acknowledgements prefix: ietf-syslog reference: RFC XXXX
The authors wish to thank the following who commented on versions 01 through 05 7. Security Considerations
of this proposal:
Martin Bjorklund <mbjorklu@cisco.com> The YANG module defined in this memo is designed to be accessed via
Jim Gibson <gibson@cisco.com> the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the
Jeffrey Haas <jhaas@pfrc.org> secure transport layer and the mandatory-to-implement secure
John Heasley <heas@shrubbery.net> transport is SSH [RFC6242]. The NETCONF access control model
Giles Heron <giheron@cisco.com> [RFC6536] provides the means to restrict access for particular
Lisa Huang <yihuan@cisco.com> NETCONF users to a pre-configured subset of all available NETCONF
Jeffrey K Lange <jeffrey.K.lange@ge.com> protocol operations and content.
Jan Lindblad <jlindbla@cisco.com>
Chris Lonvick <lonvick@gmail.com>
Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Jason Sterne <jason.sterne@alcatel-lucent.com>
Peter Van Horne <petervh@cisco.com>
Bert Wijnen <bertietf@bwijnen.net>
Aleksandr Zhdankin <azhdanki@cisco.com>
9. Change log [RFC Editor: Please remove] There are a number of data nodes defined in the YANG module which are
writable/creatable/deletable (i.e., config true, which is the
default). These data nodes may be considered sensitive or vulnerable
in some network environments. Write operations (e.g., <edit-config>)
to these data nodes without proper protection can have a negative
effect on network operations.
10. References 8. References
[RFC5424] Gerhards, R., "The Syslog Protocol", BCP 78, RFC 5424, 8.1. Normative References
March 2009.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
March 2004. Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the [RFC5424] Gerhards, R., "The Syslog Protocol", RFC 5424,
Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC5424, March 2009,
October 2010. <http://www.rfc-editor.org/info/rfc5424>.
[RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. [RFC5425] Miao, F., Ed., Ma, Y., Ed., and J. Salowey, Ed.,
Bierman, "Network Configuration Protocol (NETCONF)", RFC "Transport Layer Security (TLS) Transport Mapping for
6241, June 2011. Syslog", RFC 5425, DOI 10.17487/RFC5425, March 2009,
<http://www.rfc-editor.org/info/rfc5425>.
[RFC5426] Okmianski, A., "Transmission of Syslog Messages over UDP",
RFC 5426, DOI 10.17487/RFC5426, March 2009,
<http://www.rfc-editor.org/info/rfc5426>.
[RFC5848] Kelsey, J., Callas, J., and A. Clemm, "Signed Syslog
Messages", RFC 5848, DOI 10.17487/RFC5848, May 2010,
<http://www.rfc-editor.org/info/rfc5848>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<http://www.rfc-editor.org/info/rfc6241>.
[RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure
Shell (SSH)", RFC 6242, June 2011. Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
<http://www.rfc-editor.org/info/rfc6242>.
[RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration [RFC6587] Gerhards, R. and C. Lonvick, "Transmission of Syslog
Protocol (NETCONF) Access Control Model", RFC 6536, March Messages over TCP", RFC 6587, DOI 10.17487/RFC6587, April
2012. 2012, <http://www.rfc-editor.org/info/rfc6587>.
8.2. Informative References
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004,
<http://www.rfc-editor.org/info/rfc3688>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010,
<http://www.rfc-editor.org/info/rfc6020>.
Authors' Addresses Authors' Addresses
Clyde Wildes Clyde Wildes (editor)
Cisco Systems Inc. Cisco Systems Inc.
170 West Tasman Drive
San Jose, CA 95134
US
Phone: +1 408 527-2672
Email: cwildes@cisco.com Email: cwildes@cisco.com
Kiran Koushik (editor)
Cisco Systems Inc.
12515Research Blvd., Building 4
Austin, TX 78759
US
Kiran Agrahara Sreenivasa Phone: +1 512 378-1482
Cisco Systems, Inc.
Email: kkoushik@cisco.com Email: kkoushik@cisco.com
 End of changes. 150 change blocks. 
416 lines changed or deleted 580 lines changed or added

This html diff was produced by rfcdiff 1.44. The latest version is available from http://tools.ietf.org/tools/rfcdiff/