--- 1/draft-ietf-netmod-syslog-model-06.txt 2016-03-20 08:17:15.706060966 -0700 +++ 2/draft-ietf-netmod-syslog-model-07.txt 2016-03-20 08:17:15.798063227 -0700 @@ -1,141 +1,178 @@ -NETMOD WG Clyde Wildes -Internet-Draft Kiran Koushik -Intended status: Informational Cisco Systems Inc. -Expires: Jun 16, 2016 Dec 23, 2015 - SYSLOG YANG model - draft-ietf-netmod-syslog-model-06 +NETMOD WG C. Wildes, Ed. +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 - This document describes a data model for Syslog - protocol which is used to convey event notification messages. + This document describes a data model for the Syslog protocol which is + used to convey event notification messages. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference 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 (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. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 - 1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3 + 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 3 3. Design of the SYSLOG Model . . . . . . . . . . . . . . . . . 3 - 3.1. SYSLOG Module . . . . . . . . . . . . . . . . . . . . . . 4 - 4. SYSLOG YANG Models . . . . . . . . . . . . . . . . . . . . . 6 - 4.1. SYSLOG TYPES Module . . . . . . . . . . . . . . . . . . . 6 - 4.2. SYSLOG module . . . . . . . . . . . . . . . . . . . . . . 10 - 4.3. A SYSLOG Example . . . . . . . . . . . . . . . . . . . . 18 - 5. Implementation Status . . . . . . . . . . . . . . . . . . . . 19 - 6. Security Considerations . . . . . . . . . . . . . . . . . . . 19 - 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 - 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 20 - 9. Change log [RFC Editor: Please remove] . . . . . . . . . . . 20 - 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 20 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 21 + 3.1. SYSLOG Module . . . . . . . . . . . . . . . . . . . . . . 6 + 4. SYSLOG YANG Models . . . . . . . . . . . . . . . . . . . . . 9 + 4.1. SYSLOG-TYPES Module . . . . . . . . . . . . . . . . . . . 9 + 4.2. Syslog Module . . . . . . . . . . . . . . . . . . . . . . 15 + 4.3. A Syslog Example . . . . . . . . . . . . . . . . . . . . 29 + 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 31 + 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31 + 7. Security Considerations . . . . . . . . . . . . . . . . . . . 32 + 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 32 + 8.1. Normative References . . . . . . . . . . . . . . . . . . 32 + 8.2. Informative References . . . . . . . . . . . . . . . . . 33 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33 1. Introduction Operating systems, processes and applications generate messages indicating their own status or the occurrence of events. These messages are useful for managing and/or debugging the network and its services. The BSD Syslog protocol is a widely adopted protocol that is used for transmission and processing of the messages. - Since each process, application and operating system was - written somewhat independently, there is little uniformity to the - content of Syslog messages. For this reason, no assumption is made - upon the formatting or contents of the messages. The protocol is - simply designed to transport these event messages. No - acknowledgement of the receipt is made. + Since each process, application and operating system was written + somewhat independently, there is little uniformity to the content of + Syslog messages. For this reason, no assumption is made upon the + formatting or contents of the messages. The protocol is simply + designed to transport these event messages. No acknowledgement of + the receipt is made. Essentially, a Syslog process receives messages (from the kernel, processes, applications or other Syslog processes) and processes - those. The processing involves logging to a local file, displaying on - console, user terminal, and/or relaying to syslog processes on other - machines. The processing is determined by the "facility" that + those. The processing involves logging to a local file, displaying + on console, user terminal, and/or relaying to syslog processes on + other machines. The processing is determined by the "facility" that originated the message and the "severity" assigned to the message by the facility. We are using definitions of Syslog protocol from [RFC5424] in this draft. -1.1. Definitions and Acronyms - - IP: Internet Protocol - - IPv4: Internet Protocol version 4 - - IPv6: Internet Protocol version 6 - - UDP: User Datagram Protocol +1.1. Requirements Language - 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 This document defines a YANG [RFC6020] configuration data model that - may be used to monitor and control one or more syslog processes running - on a system. YANG models can be used with network management + may be used to monitor and control one or more syslog processes + running on a system. YANG models can be used with network management agents such as NETCONF [RFC6241] to install, manipulate, and delete the configuration of network devices. This module makes use of the YANG "feature" construct which allows - implementations to support only those Syslog features that lie - within their capabilities. + implementations to support only those Syslog features that lie within + their capabilities. + + This module can be used to configure the SYSLOG application + conceptual layer [RFC5424]. 3. Design of the SYSLOG Model The syslog model was designed by comparing various syslog features implemented by various vendors' in different implementations. - This draft addresses the common leafs between all vendors and creates - a common model, which can be augmented with proprietary features, if - necessary. The base model is designed to be very simple for maximum - flexibility. + This draft addresses the common leafs between implementations and + creates a common model, which can be augmented with proprietary + features, if necessary. The base model is designed to be very simple + for maximum flexibility. - Syslog consists of message producers, a group level suppression filter, - and message distributors. The following digram shows syslog messages - flowing from a message producer, through the group level suppression - filter, and if passed by the group filter to message distributors where - further suppression filtering can take place. + Many vendors extend the list of facilities available for logging in + their implementation. Here is an example that shows how additional + facilities could be added to the list of available facilities (in + this case two facilities are added): - Message Producers + module vendor-syslog-types { + namespace "urn:vendor:params:xml:ns:yang:vendor-syslog-types"; + prefix vendor-syslogtypes; + + import ietf-syslog-types { + prefix syslogtypes; + } + + organization "Vendor, Inc."; + contact + "Vendor, Inc. + Customer Service + + E-mail: syslog-yang@vendor.com"; + + description + "This module contains a collection of vendor-sprecific YANG type + definitions for SYSLOG."; + + revision 2016-03-20 { + description + "Version 1.0"; + reference + "Vendor SYSLOG Types: SYSLOG YANG Model"; + } + + identity vendor_specific_type_1 { + 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 | +-------------+ +-------------+ +-------------+ +-------------+ @@ -146,41 +183,42 @@ | | +-----------+------------+--------------+ | | | | v v v | Message Distributors | +----------+ +----------+ +----------+ | | | | Log | | Log | | | Console | | Buffer(s)| | File(s) | | +----------+ +----------+ +----------+ | + | +-------------+-------------+ | | | v v v - +-------------+ +-----------+ +-----------+ - |Remote | | | |User | + +----------------+ +-----------+ +-----------+ + |Remote Relay(s)/| | | |User | |Collectors(s)| |Terminal(s)| |Sessions(s)| - +-------------+ +-----------+ +-----------+ + +----------------+ +-----------+ +-----------+ - The leaves in the base syslog model correspond to the group level - suppression filter and each message distributor: + The leaves in the base syslog model log-actions container correspond + to each message distributor: - - console - - log buffer(s) - - log file(s) - - remote collector(s) - - terminal(s) - - user session(s). + console + log buffer(s) + log file(s) + remote relay(s)/collector(s) + terminal(s) + user session(s). - Optional features are used to specified fields that are not present in - all vendor configurations. + Optional features are used to specified functionality that is present + in specific vendor configurations. 3.1. SYSLOG Module A simplified graphical representation of the complete data tree is presented here. Each node is printed as: @@ -178,38 +216,42 @@ 3.1. SYSLOG Module A simplified graphical representation of the complete data tree is presented here. Each node is printed as: is one of: + + for current x for deprecated o for obsolete is one of: + rw for configuration data ro for non-configuration data -x for rpcs -n for notifications is the name of the node + () means that the node is a choice node :() means that the node is a case node - If the node is augmented into the tree from another module, its - name is printed as :. + If the node is augmented into the tree from another module, its name + is printed as :. is one of: + ? for an optional leaf or choice ! for a presence container * for a leaf-list or list [] for a list's keys is the name of the type for leafs and leaf-lists If the type is a leafref, the type is printed as "-> TARGET", where TARGET is either the leafref path, with prefixed removed if possible. @@ -212,185 +254,213 @@ If the type is a leafref, the type is printed as "-> TARGET", where TARGET is either the leafref path, with prefixed removed if possible. is the list of features this node depends on, printed within curly brackets and a question mark "{...}?" module: ietf-syslog +--rw syslog +--rw log-actions - +--rw console! + +--rw console! {console-action}? | +--rw log-selector | +--rw (selector-facility) | | +--:(no-log-facility) | | | +--rw no-facilities? empty | | +--:(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}? - +--rw buffer + | | +--rw severity-operator? enumeration {selector-sevop-config}? + | +--rw pattern-match? string {selector-match-config}? + +--rw buffer {buffer-action}? | +--rw log-buffer* [name] | +--rw name string | +--rw log-selector | | +--rw (selector-facility) | | | +--:(no-log-facility) | | | | +--rw no-facilities? empty | | | +--:(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}? + | | | +--rw severity-operator? enumeration {selector-sevop-config}? + | | +--rw pattern-match? string {selector-match-config}? | +--rw buffer-size-bytes? uint64 {buffer-limit-bytes}? | +--rw buffer-size-messages? uint64 {buffer-limit-messages}? + | +--rw structured-data? boolean {structured-data-config}? +--rw file | +--rw log-file* [name] | +--rw name inet:uri | +--rw log-selector | | +--rw (selector-facility) | | | +--:(no-log-facility) | | | | +--rw no-facilities? empty | | | +--:(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}? + | | | +--rw severity-operator? enumeration {selector-sevop-config}? + | | +--rw pattern-match? string {selector-match-config}? | +--rw structured-data? boolean {structured-data-config}? | +--rw file-archive | +--rw number-of-files? uint32 {file-limit-size}? | +--rw max-file-size? uint64 {file-limit-size}? | +--rw rollover? uint32 {file-limit-duration}? | +--rw retention? uint16 {file-limit-duration}? +--rw remote | +--rw destination* [name] | +--rw name string | +--rw (transport) | | +--:(tcp) | | | +--rw tcp | | | +--rw address? inet:host | | | +--rw port? inet:port-number | | +--:(udp) - | | +--rw udp + | | | +--rw udp + | | | +--rw address? inet:host + | | | +--rw port? inet:port-number + | | +--:(tls) + | | +--rw tls | | +--rw address? inet:host | | +--rw port? inet:port-number | +--rw log-selector | | +--rw (selector-facility) | | | +--:(no-log-facility) | | | | +--rw no-facilities? empty | | | +--:(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}? + | | | +--rw severity-operator? enumeration {selector-sevop-config}? + | | +--rw pattern-match? string {selector-match-config}? | +--rw destination-facility? identityref | +--rw source-interface? if:interface-ref + | +--rw structured-data? boolean {structured-data-config}? | +--rw syslog-sign! {signed-messages-config}? | +--rw cert-initial-repeat uint16 | +--rw cert-resend-delay uint16 | +--rw cert-resend-count uint16 | +--rw sig-max-delay uint16 | +--rw sig-number-resends uint16 | +--rw sig-resend-delay uint16 | +--rw sig-resend-count uint16 - +--rw terminal - | +--rw (terminal-scope) - | +--:(all-terminals) - | | +--rw all-terminals + +--rw terminal {terminal-action}? + | +--rw all-terminals! | | +--rw log-selector | | +--rw (selector-facility) | | | +--:(no-log-facility) | | | | +--rw no-facilities? empty | | | +--:(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}? - | +--:(per-terminal) {terminal-facility-user-logging-config}? - | +--rw device-name* [dname] - | +--rw dname string + | | | +--rw severity-operator? enumeration {selector-sevop-config}? + | | +--rw pattern-match? string {selector-match-config}? + | +--rw terminal* [name] {terminal-facility-user-logging-config}? + | +--rw name string | +--rw log-selector | +--rw (selector-facility) | | +--:(no-log-facility) | | | +--rw no-facilities? empty | | +--:(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}? - +--rw session - +--rw (user-scope) - +--:(all-users) - | +--rw all-users + | | +--rw severity-operator? enumeration {selector-sevop-config}? + | +--rw pattern-match? string {selector-match-config}? + +--rw session {session-action}? + +--rw all-users! | +--rw log-selector | +--rw (selector-facility) | | +--:(no-log-facility) | | | +--rw no-facilities? empty | | +--:(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}? - +--:(per-user) {session-facility-user-logging-config}? - +--rw user-name* [uname] - +--rw uname string + | | +--rw severity-operator? enumeration {selector-sevop-config}? + | +--rw pattern-match? string {selector-match-config}? + +--rw user* [name] {session-facility-user-logging-config}? + +--rw name string +--rw log-selector +--rw (selector-facility) | +--:(no-log-facility) | | +--rw no-facilities? empty | +--:(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}? + | +--rw severity-operator? enumeration {selector-sevop-config}? + +--rw pattern-match? string {selector-match-config}? 4. SYSLOG YANG Models -4.1. SYSLOG-TYPES module +4.1. SYSLOG-TYPES Module file "ietf-syslog-types.yang" module ietf-syslog-types { namespace "urn:ietf:params:xml:ns:yang:ietf-syslog-types"; prefix syslogtypes; organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; contact "WG Web: WG List: - WG Chair: Tom Nadeau - + WG Chair: Lou Berger + + + WG Chair: Jurgen Schonwalder + WG Chair: Kent Watsen - Editor: Ladislav Lhotka - "; + Editor: Kiran Agrahara Sreenivasa + + + Editor: Clyde Wildes + "; description "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 "Initial Revision"; reference - "This model references RFC 5424 - The Syslog Protocol, - and RFC 5848 - Signed Syslog Messages."; + "RFC XXXX: SYSLOG YANG Model"; + } typedef severity { type enumeration { enum "emergency" { value 0; description "Emergency Level Msg"; } enum "alert" { @@ -425,185 +495,187 @@ } enum "debug" { value 7; description "Debugging Level Msg"; } } description "The definitions for Syslog message severity as per RFC 5424."; } - identity syslog-facility { 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 { base syslog-facility; description - "The facility for kernel messages as defined in RFC 5424."; + "The facility for kernel messages (0) as defined in RFC 5424."; } identity user { base syslog-facility; 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 { base syslog-facility; 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 { base syslog-facility; 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 { base syslog-facility; description - "The facility for security/authorization messages as defined + "The facility for security/authorization messages (4) as defined in RFC 5424."; } + identity syslog { base syslog-facility; description "The facility for messages generated internally by syslogd - facility as defined in RFC 5424."; + facility (5)as defined in RFC 5424."; } identity lpr { base syslog-facility; description - "The facility for the line printer subsystem as defined in + "The facility for the line printer subsystem (6) as defined in RFC 5424."; } identity news { base syslog-facility; description - "The facility for the network news subsystem as defined in + "The facility for the network news subsystem (7) as defined in RFC 5424."; } identity uucp { base syslog-facility; 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 { base syslog-facility; 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 { base syslog-facility; description - "The facility for privileged security/authorization messages + "The facility for privileged security/authorization messages (10) as defined in RFC 5424."; } identity ftp { base syslog-facility; 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 { base syslog-facility; 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 { base syslog-facility; 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 { base syslog-facility; 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 { base syslog-facility; description - "The facility for the second clock daemon as defined in + "The facility for the second clock daemon (15) as defined in RFC 5424."; } identity local0 { base syslog-facility; description - "The facility for local use 0 messages as defined in + "The facility for local use 0 messages (16) as defined in RFC 5424."; } identity local1 { base syslog-facility; description - "The facility for local use 1 messages as defined in + "The facility for local use 1 messages (17) as defined in RFC 5424."; } identity local2 { base syslog-facility; description - "The facility for local use 2 messages as defined in + "The facility for local use 2 messages (18) as defined in RFC 5424."; } identity local3 { base syslog-facility; description - "The facility for local use 3 messages as defined in + "The facility for local use 3 messages (19) as defined in RFC 5424."; } identity local4 { base syslog-facility; description - "The facility for local use 4 messages as defined in + "The facility for local use 4 messages (20) as defined in RFC 5424."; } identity local5 { base syslog-facility; description - "The facility for local use 5 messages as defined in + "The facility for local use 5 messages (21) as defined in RFC 5424."; } identity local6 { base syslog-facility; description - "The facility for local use 6 messages as defined in + "The facility for local use 6 messages (22) as defined in RFC 5424."; } identity local7 { base syslog-facility; description - "The facility for local use 7 messages as defined in + "The facility for local use 7 messages (23) as defined in RFC 5424."; } } - -4.2. SYSLOG module + +4.2. Syslog Module file "ietf-syslog.yang" module ietf-syslog { namespace "urn:ietf:params:xml:ns:yang:ietf-syslog"; prefix syslog; import ietf-inet-types { prefix inet; } @@ -614,135 +686,194 @@ import ietf-syslog-types { prefix syslogtypes; } organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; contact "WG Web: WG List: - WG Chair: Tom Nadeau - + WG Chair: Lou Berger + + + WG Chair: Jurgen Schonwalder + WG Chair: Kent Watsen - Editor: Ladislav Lhotka - "; + Editor: Kiran Agrahara Sreenivasa + + + Editor: Clyde Wildes + "; description "This module contains a collection of YANG definitions - for Syslog configuration."; + for Syslog configuration. + + 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."; - revision 2015-11-09 { - description - "Initial Revision"; reference "RFC 5424: The Syslog Protocol RFC 5848: Signed Syslog Messages"; + + revision 2016-03-20{ + description + "Initial Revision"; + reference + "RFC XXXX: SYSLOG YANG Model"; + } + + 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 { description "This feature indicates that local memory logging buffers are limited in size using a limit expressed in bytes."; } feature buffer-limit-messages { description "This feature indicates that local memory logging buffers are limited in size using a limit expressed in number 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 { description "This feature indicates that file logging resources are managed using size and number limits."; } feature file-limit-duration { description "This feature indicates that file logging resources 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 { description "This feature represents the ability to adjust log message settings for individual terminal devices."; } + feature session-action { + description + "This feature indicates that logging to user + CLI session is supported."; + } feature session-facility-user-logging-config { description "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 "This feature represents the ability to select messages using the additional operators equal to, or not equal to when comparing the Syslog message severity."; } - feature selector-match-processing-config { + feature selector-match-config { description "This feature represents the ability to select messages based 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 { description "This feature represents the ability to configure signed syslog messages according to RFC 5848."; } grouping syslog-severity { description "This grouping defines the Syslog severity which is used to select log messages."; leaf severity { type union { type syslogtypes:severity; type enumeration { enum all { value -1; description "This enum describes the case where all severities - are requested."; + are selected."; } enum none { value -2; description "This enum describes the case where no severities - are requested."; + are selected."; } } } mandatory true; description "This leaf specifies the Syslog message severity. When severity is specified, the default severity comparison is all messages of the specified severity and greater are - logged. 'all' is a special case which means all severities - are requested. 'none' is a special case which means that - no severity selection should occur."; + selected. 'all' is a special case which means all severities + are selected. 'none' is a special case which means that + no selection should occur or disable this filter."; } 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 { enum equals-or-higher { description "This enum specifies all messages of the specified severity and higher are logged according to the given log-action"; } enum equals { description "This enum specifies all messages that are for @@ -816,112 +948,127 @@ } } description "The leaf uniquely identifies a Syslog facility."; } uses syslog-severity; } } } leaf pattern-match { - if-feature selector-match-processing-config; + if-feature selector-match-config; type string; description "This leaf desribes a Posix 1003.2 regular expression string that can be used to select a Syslog message for logging. The match is performed on the RFC 5424 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 { description "This container describes the configuration parameters for Syslog."; container log-actions { description "This container describes the log-action parameters for Syslog."; container console { + if-feature console-action; presence "Enables logging console configuration"; description "This container describes the configuration parameters for console logging."; uses syslog-selector; } container buffer { + if-feature buffer-action; description "This container describes the configuration parameters for local memory buffer logging. The buffer is circular in 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 { key name; description "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 { type string; description "This leaf specifies the name of the log buffer."; } uses syslog-selector; leaf buffer-size-bytes { if-feature buffer-limit-bytes; type uint64; units "bytes"; description - "This leaf configures the amount of memory - (in bytes) that will be dedicated to the local - memory logging buffer. The default value varies - by implementation."; + "This leaf configures the amount of memory (in bytes) that + will be dedicated to the local memory logging buffer. + The default value varies by implementation."; } leaf buffer-size-messages { if-feature buffer-limit-messages; type uint64; units "log messages"; description - "This leaf configures the amount number of log - messages that can be stored in the local memory - logging buffer. The default value varies by - implementation."; + "This leaf configures the amount number of log messages that + can be stored in the local memory logging buffer. The + default value varies by implementation."; } + uses syslog-structured-data; } } container file { description "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 { key "name"; description "This list describes a collection of local logging files."; leaf name { - type inet:uri; + type inet:uri { + pattern 'file:.*'; + } description "This leaf specifies the name of the log file which MUST use the uri scheme file:."; } uses syslog-selector; - 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."; - } + uses syslog-structured-data; container file-archive { description "This container describes the configuration parameters for log file archiving."; leaf number-of-files { if-feature file-limit-size; type uint32; description "This leaf specifies the maximum number of log files retained. Specify 1 for implementations @@ -973,20 +1120,23 @@ } 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; @@ -995,37 +1145,63 @@ "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 + "This leaf specifies the port number used to + deliver messages to the remote server."; + } + } + } } uses syslog-selector; leaf destination-facility { type identityref { base syslogtypes:syslog-facility; } default syslogtypes:local7; description "This leaf specifies the facility used in messages delivered to the remote server."; @@ -1033,20 +1209,21 @@ leaf source-interface { type if:interface-ref; description "This leaf sets the source interface for the remote Syslog server. Either the interface name or the interface IP address can be specified. 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"; } + uses syslog-structured-data; container syslog-sign { if-feature signed-messages-config; presence "If present, syslog-sign is activated."; description "This container describes the configuration parameters for signed syslog messages as described by RFC 5848."; reference "RFC 5848: Signed Syslog Messages"; @@ -1108,106 +1285,78 @@ "This leaf specifies when to send the next Signature Block transmission based on a count. If this many other syslog messages have been sent since the previous sending of this Signature Block, resend it."; } } } } container terminal { + if-feature terminal-action; description "This container describes the configuration parameters for the terminal logging configuration."; - choice terminal-scope { - mandatory true; - description - "This choice describes the option to specify all - terminals or a specific terminal. The all terminals - case implies that messages will be sent to all - sessions on that terminal"; - case all-terminals { - description - "This case specifies all terminals."; container all-terminals { + presence "Enables logging to all terminals."; description "This container describes the configuration parameters for all terminals."; uses syslog-selector; } - } - case per-terminal { + list terminal { if-feature terminal-facility-user-logging-config; + key "name"; description - "This case specifies one or more terminals."; - list device-name { - key "dname"; - description - "This list describes a collection of device names."; - leaf dname { + "This list describes a collection of "; + leaf name { type string; description - "This leaf uniquely describes a device name which - is the device to receive log messages."; + "This leaf uniquely describes a terminal which + will receive log messages."; } uses syslog-selector; } } - } - } container session { + if-feature session-action; description "This container describes the configuration parameters for - session logging configuration."; - choice user-scope { - mandatory true; - description - "This choice describes the option to specify all users - or a specific user. The all users case implies that - messages will be sent to all sessions"; - case all-users { - description - "This case specifies all users."; + user CLI session logging configuration."; container all-users { + presence "Enables logging to all user sessions."; description "This container describes the configuration parameters for all users."; uses syslog-selector; } - } - case per-user { + list user { if-feature session-facility-user-logging-config; - description - "This case specifies a specific user."; - list user-name { - key "uname"; + key "name"; description "This list describes a collection of user names."; - leaf uname { + leaf name { 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; } } } } } - } -} - -4.3. A SYSLOG Example +4.3. A Syslog Example Requirement: Enable console logging of syslogs of severity critical Here is the example syslog configuration xml: @@ -1259,141 +1409,157 @@ error - -5. Implementation Status - - [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. +5. Acknowledgements - Five leaves were implemented in the base IETF model and three leaves - were implemented in the Cisco specific augmentation model as follows: + The authors wish to thank the following who commented on versions 01 + through 06 of this proposal: - Leaf XPATH Sample NXOS CLI Command(s) + Martin Bjorklund + Jim Gibson + Jeffrey Haas + John Heasley + Giles Heron + Lisa Huang + Jeffrey K Lange + Jan Lindblad + Chris Lonvick + Tom Petch + Juergen Schoenwaelder + Jason Sterne + Peter Van Horne + Bert Wijnen + Aleksandr Zhdankin - syslog:log-actions/console logging console 1 - 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 +6. IANA Considerations - *The "logging server" and "logging source-interface" commands were - combined into one base model leaf. + This document registers two URIs in the IETF XML registry [RFC3688]. - The description of implementations in this section is intended to assist - the IETF in its decision processes in progressing drafts to RFCs. + Following the format in RFC 3688, the following registration is + 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 - 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. + Registrant Contact: The IESG. - 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., ) - to these data nodes without proper protection can have a negative - effect on network operations. + XML: N/A, the requested URI is an XML namespace. - TBD: List specific Subtrees and data nodes and their sensitivity/ - vulnerability. + This document registers a YANG module in the YANG Module Names + 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] - [RFC3688]. Following the format in RFC 3688, the following - registration is requested to be made: + prefix: ietf-syslog-types reference: RFC XXXX + Following the format in RFC 3688, the following registration is + 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. XML: N/A, the requested URI is an XML namespace. This document registers a YANG module in the YANG Module Names registry [RFC6020]. - name: syslog namespace: urn:ietf:params:xml:ns:yang:syslog - prefix: syslog reference: RFC XXXX + name: ietf-syslog namespace: urn:ietf:params:xml:ns:yang:ietf-syslog -8. Acknowledgements + prefix: ietf-syslog reference: RFC XXXX -The authors wish to thank the following who commented on versions 01 through 05 -of this proposal: +7. Security Considerations -Martin Bjorklund -Jim Gibson -Jeffrey Haas -John Heasley -Giles Heron -Lisa Huang -Jeffrey K Lange -Jan Lindblad -Chris Lonvick -Juergen Schoenwaelder -Jason Sterne -Peter Van Horne -Bert Wijnen -Aleksandr Zhdankin + The YANG module defined in this memo is designed to be accessed via + the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the + secure transport layer and the mandatory-to-implement secure + transport is SSH [RFC6242]. The NETCONF access control model + [RFC6536] provides the means to restrict access for particular + NETCONF users to a pre-configured subset of all available NETCONF + protocol operations and content. -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., ) + 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, - March 2009. +8.1. Normative References - [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, - March 2004. + [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate + Requirement Levels", BCP 14, RFC 2119, + DOI 10.17487/RFC2119, March 1997, + . - [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the - Network Configuration Protocol (NETCONF)", RFC 6020, - October 2010. + [RFC5424] Gerhards, R., "The Syslog Protocol", RFC 5424, + DOI 10.17487/RFC5424, March 2009, + . - [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. - Bierman, "Network Configuration Protocol (NETCONF)", RFC - 6241, June 2011. + [RFC5425] Miao, F., Ed., Ma, Y., Ed., and J. Salowey, Ed., + "Transport Layer Security (TLS) Transport Mapping for + Syslog", RFC 5425, DOI 10.17487/RFC5425, March 2009, + . + + [RFC5426] Okmianski, A., "Transmission of Syslog Messages over UDP", + RFC 5426, DOI 10.17487/RFC5426, March 2009, + . + + [RFC5848] Kelsey, J., Callas, J., and A. Clemm, "Signed Syslog + Messages", RFC 5848, DOI 10.17487/RFC5848, May 2010, + . + + [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, + . [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, + . - [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration - Protocol (NETCONF) Access Control Model", RFC 6536, March - 2012. + [RFC6587] Gerhards, R. and C. Lonvick, "Transmission of Syslog + Messages over TCP", RFC 6587, DOI 10.17487/RFC6587, April + 2012, . + +8.2. Informative References + + [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, + DOI 10.17487/RFC3688, January 2004, + . + + [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for + the Network Configuration Protocol (NETCONF)", RFC 6020, + DOI 10.17487/RFC6020, October 2010, + . Authors' Addresses - Clyde Wildes + Clyde Wildes (editor) Cisco Systems Inc. + 170 West Tasman Drive + San Jose, CA 95134 + US + + Phone: +1 408 527-2672 Email: cwildes@cisco.com + Kiran Koushik (editor) + Cisco Systems Inc. + 12515Research Blvd., Building 4 + Austin, TX 78759 + US - Kiran Agrahara Sreenivasa - Cisco Systems, Inc. + Phone: +1 512 378-1482 Email: kkoushik@cisco.com