--- 1/draft-ietf-netmod-syslog-model-11.txt 2017-02-14 06:13:12.070100121 -0800 +++ 2/draft-ietf-netmod-syslog-model-12.txt 2017-02-14 06:13:12.130101546 -0800 @@ -1,101 +1,99 @@ NETMOD WG C. Wildes, Ed. Internet-Draft K. Koushik, Ed. Intended status: Standards Track Cisco Systems Inc. -Expires: May 17, 2017 November 13, 2016 +Expires: August 16, 2017 February 14, 2017 A YANG Data Model for Syslog Configuration - draft-ietf-netmod-syslog-model-11 + draft-ietf-netmod-syslog-model-12 Abstract This document describes a data model for the configuration of syslog. -Status of This Memo +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 May 17, 2017. + This Internet-Draft will expire on August 16, 2017. Copyright Notice - Copyright (c) 2016 IETF Trust and the persons identified as the + Copyright (c) 2017 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. + 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. Requirements Language . . . . . . . . . . . . . . . . . . 3 - 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 - 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 3 - 3. Design of the Syslog Model . . . . . . . . . . . . . . . . . 3 + 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2 + 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 2 + 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 + 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 2 + 3. Design of the Syslog Model . . . . . . . . . . . . . . . . . . 3 3.1. Syslog Module . . . . . . . . . . . . . . . . . . . . . . 5 4. Syslog YANG Modules . . . . . . . . . . . . . . . . . . . . . 8 - 4.1. The ietf-syslog-types Module . . . . . . . . . . . . . . 8 - 4.2. The ietf-syslog Module . . . . . . . . . . . . . . . . . 14 - 5. Usage Examples . . . . . . . . . . . . . . . . . . . . . . . 26 - 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 28 - 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28 - 8. Security Considerations . . . . . . . . . . . . . . . . . . . 29 - 8.1. Resource Constraints . . . . . . . . . . . . . . . . . . 29 - 8.2. Inappropriate Configuration . . . . . . . . . . . . . . . 30 - 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 30 - 9.1. Normative References . . . . . . . . . . . . . . . . . . 30 - 9.2. Informative References . . . . . . . . . . . . . . . . . 30 - Appendix A. Implementor Guidelines . . . . . . . . . . . . . . . 31 - A.1. Extending Facilities . . . . . . . . . . . . . . . . . . 31 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32 + 4.1. The ietf-syslog-types Module . . . . . . . . . . . . . . . 8 + 4.2. The ietf-syslog Module . . . . . . . . . . . . . . . . . . 14 + 5. Usage Examples . . . . . . . . . . . . . . . . . . . . . . . . 25 + 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 26 + 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 + 8. Security Considerations . . . . . . . . . . . . . . . . . . . 27 + 8.1. Resource Constraints . . . . . . . . . . . . . . . . . . . 27 + 8.2. Inappropriate Configuration . . . . . . . . . . . . . . . 27 + 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 27 + 9.1. Normative References . . . . . . . . . . . . . . . . . . . 27 + 9.2. Informative References . . . . . . . . . . . . . . . . . . 28 + Appendix A. Implementor Guidelines . . . . . . . . . . . . . . . . 28 + Appendix A.1. Extending Facilities . . . . . . . . . . . . . . 28 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 29 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. 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 - originated the message and the "severity" assigned to the message by - the facility. + on console, 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 RFC. 1.1. Requirements Language 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]. @@ -124,23 +121,26 @@ 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 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 originators, and collectors. The following digram - shows syslog messages flowing from an originator, to collectors where - suppression filtering can take place. + Optional features are used to specify functionality that is present + in specific vendor configurations. + + Syslog consists of originators, and collectors. The following + diagram shows syslog messages flowing from an originator, to + collectors where filtering can take place. Many vendors extend the list of facilities available for logging in their implementation. An example is included in Extending Facilities (Appendix A.1). Originators +-------------+ +-------------+ +-------------+ +-------------+ | Various | | OS | | | | Remote | | Components | | Kernel | | Line Cards | | Servers | +-------------+ +-------------+ +-------------+ +-------------+ @@ -149,71 +149,67 @@ | SNMP | | Interface | | Standby | | Syslog | | Events | | Events | | Supervisor | | Itself | +-------------+ +-------------+ +-------------+ +-------------+ | | +----------------------------------------------------------------+ | | | | - +-----------+------------+--------------+ - | | | | - v v v | - Collectors | - +----------+ +----------+ +----------+ | - | | | Log | | Log | | - | Console | | Buffer | | File(s) | | - +----------+ +----------+ +----------+ | - | - +-+-------------+ - | | - v v - - +----------------+ +-----------+ - |Remote Relay(s)/| |User | - |Collectors(s) | |Sessions(s)| - +----------------+ +-----------+ + +-------------+--------------+ + | | | + v v v + Collectors + +----------+ +----------+ +----------------+ + | | | Log | |Remote Relay(s)/| + | Console | | File(s) | |Collector(s) | + +----------+ +----------+ +----------------+ Figure 1. Syslog Processing Flow The leaves in the base syslog model actions container correspond to each message collector: console - log buffer log file(s) remote relay(s)/collector(s) - user session(s). Within each action, a selector is used to filter syslog messages. A - selector consists of two parts: one or more facility-severity - matches, and if supported via the select-match feature, an optional - regular expression pattern match that is performed on the SYSLOG-MSG - field. + selector consists of a list of one or more facility-severity matches, + and, if supported via the select-match feature, an optional regular + expression pattern match that is performed on the SYSLOG-MSG field. - The facility is one of a specific syslogtypes:syslog-facility, none, - or all facilities. None is a special case that can be used to - disable an action. + Selector processing (input is syslog message): + + 1. Loop through facility-list + a. Facility match processing - continue to the next entry in + the list if no match + b. Severity compare processing - continue to the next list + entry if no match + c. Match - proceed with the action and exit further processing + 2. Process pattern match if specified and if a match proceed with + the action + + The facility is one of a specific syslogtypes:syslog-facility, or all + facilities. The severity is one of syslogtypes:severity, all severities, or none. None is a special case that can be used to disable a facility. When - filtering severity, the default comparison is that all messages of - the specified severity and higher are logged. This is shown in the - model as ?default equals-or-higher?. This behavior can be altered if - the select-sev-compare feature is enabled to specify: ?equals? to - specify only this single severity; ?not-equals? to ignore that - severity; ?equals-or-higher? to specify all messages of the specified - severity and higher. - - Optional features are used to specified functionality that is present - in specific vendor configurations. + filtering severity, the default comparison is that messages of the + specified severity and higher are selected to be logged. This is + shown in the model as "default equals-or-higher". This behavior can + be altered if the select-adv-compare feature is enabled to specify a + compare operatorn and an action. Compare operations are: "equals" + to select messages with this single severity, or "equals-or-higher" + to select messages of the specified severity and higher. Actions are + to log the message or block the message from being logged. 3.1. Syslog Module A simplified graphical representation of the complete data tree is presented here. Each node is printed as: @@ -245,125 +241,80 @@ * 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. is the list of features this node depends on, printed within curly brackets and a question mark "{...}?" - module: ietf-syslog +--rw syslog! +--rw actions - +--rw console! + +--rw console! {console-action}? | +--rw selector - | +--rw (selector-facility) - | | +--:(facility) - | | | +--rw no-facilities? empty - | | +--:(name) - | | +--rw facility-list* [facility] + | +--rw facility-list* [facility severity] | | +--rw facility union | | +--rw severity union - | | +--rw compare? enumeration {select-sev-compare}? + | | +--rw advanced-compare {select-adv-compare}? + | | +--rw compare? enumeration + | | +--rw action? enumeration | +--rw pattern-match? string {select-match}? - +--rw buffer {buffer-action}? - | +--rw selector - | | +--rw (selector-facility) - | | | +--:(facility) - | | | | +--rw no-facilities? empty - | | | +--:(name) - | | | +--rw facility-list* [facility] - | | | +--rw facility union - | | | +--rw severity union - | | | +--rw compare? enumeration {select-sev-compare}? - | | +--rw pattern-match? string {select-match}? - | +--rw structured-data? boolean {structured-data}? - | +--rw buffer-limit-bytes? uint64 {buffer-limit-bytes}? - | +--rw buffer-limit-messages? uint64 {buffer-limit-messages}? - +--rw file + +--rw file {file-action}? | +--rw log-file* [name] | +--rw name inet:uri | +--rw selector - | | +--rw (selector-facility) - | | | +--:(facility) - | | | | +--rw no-facilities? empty - | | | +--:(name) - | | | +--rw facility-list* [facility] + | | +--rw facility-list* [facility severity] | | | +--rw facility union | | | +--rw severity union - | | | +--rw compare? enumeration {select-sev-compare}? + | | | +--rw advanced-compare {select-adv-compare}? + | | | +--rw compare? enumeration + | | | +--rw action? enumeration | | +--rw pattern-match? string {select-match}? | +--rw structured-data? boolean {structured-data}? | +--rw file-rotation | +--rw number-of-files? uint32 {file-limit-size}? - | +--rw max-file-size? uint64 {file-limit-size}? + | +--rw max-file-size? uint32 {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 retention? uint32 {file-limit-duration}? + +--rw remote {remote-action}? + +--rw destination* [name] + +--rw name string + +--rw (transport) + | +--:(tcp) + | | +--rw tcp | | +--rw address? inet:host | | +--rw port? inet:port-number - | +--rw selector - | | +--rw (selector-facility) - | | | +--:(facility) - | | | | +--rw no-facilities? empty - | | | +--:(name) - | | | +--rw facility-list* [facility] - | | | +--rw facility union - | | | +--rw severity union - | | | +--rw compare? enumeration {select-sev-compare}? - | | +--rw pattern-match? string {select-match}? - | +--rw structured-data? boolean {structured-data}? - | +--rw facility-override? identityref - | +--rw source-interface? if:interface-ref - | +--rw signing-options! {signed-messages}? - | +--rw cert-initial-repeat uint16 - | +--rw cert-resend-delay uint16 - | +--rw cert-resend-count uint16 - | +--rw max-delay uint16 - | +--rw number-resends uint16 - | +--rw resend-delay uint16 - | +--rw resend-count uint16 - +--rw session - +--rw all-users! - | +--rw selector - | +--rw (selector-facility) - | | +--:(facility) - | | | +--rw no-facilities? empty - | | +--:(name) - | | +--rw facility-list* [facility] + | +--:(udp) + | +--rw udp + | +--rw address? inet:host + | +--rw port? inet:port-number + +--rw selector + | +--rw facility-list* [facility severity] | | +--rw facility union | | +--rw severity union - | | +--rw compare? enumeration {select-sev-compare}? + | | +--rw advanced-compare {select-adv-compare}? + | | +--rw compare? enumeration + | | +--rw action? enumeration | +--rw pattern-match? string {select-match}? - +--rw user* [name] - +--rw name string - +--rw selector - +--rw (selector-facility) - | +--:(facility) - | | +--rw no-facilities? empty - | +--:(name) - | +--rw facility-list* [facility] - | +--rw facility union - | +--rw severity union - | +--rw compare? enumeration {select-sev-compare}? - +--rw pattern-match? string {select-match}? + +--rw structured-data? boolean {structured-data}? + +--rw facility-override? identityref + +--rw source-interface? if:interface-ref {remote-source-interface}? + +--rw signing-options! {signed-messages}? + +--rw cert-initial-repeat uint16 + +--rw cert-resend-delay uint16 + +--rw cert-resend-count uint16 + +--rw max-delay uint16 + +--rw number-resends uint16 + +--rw resend-delay uint16 + +--rw resend-count uint16 Figure 2. ietf-syslog Module Tree 4. Syslog YANG Modules 4.1. The ietf-syslog-types Module This module references [RFC5424]. file "ietf-syslog-types.yang" @@ -407,35 +358,35 @@ '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-11-13 { + revision 2017-02-14 { description "Initial Revision"; reference "RFC XXXX: SYSLOG YANG Model"; + } typedef severity { type enumeration { enum "emergency" { value 0; description "The severity level 'Emergency' indicating that the system is unusable."; - } enum "alert" { value 1; description "The severity level 'Alert' indicating that an action must be taken immediately."; } enum "critical" { value 2; description @@ -699,221 +653,225 @@ 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 5426: Transmission of Syslog Messages over UDP RFC 6587: Transmission of Syslog Messages over TCP RFC 5848: Signed Syslog Messages"; - revision 2016-11-13 { + revision 2017-02-14 { description "Initial Revision"; reference "RFC XXXX: Syslog YANG Model"; } - feature buffer-action { - description - "This feature indicates that the local memory logging buffer - action is supported."; - - } - - feature buffer-limit-bytes { + feature console-action { description - "This feature indicates that the local memory logging buffer - is limited in size using a limit expressed in bytes."; + "This feature indicates that the local console action is + supported."; } - feature buffer-limit-messages { + feature file-action { description - "This feature indicates that the local memory logging buffer - is limited in size using a limit expressed in number of log - messages."; + "This feature indicates that the local file action is + supported."; } 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 select-sev-compare { + feature remote-action { + description + "This feature indicates that the remote server action is + supported."; + } + + feature remote-source-interface { + description + "This feature indicates that source-interface is supported + supported for the remote-action."; + } + + feature select-adv-compare { 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."; + using the additional comparison operators when comparing + the syslog message severity."; } feature select-match { description "This feature represents the ability to select messages based on a Posix 1003.2 regular expression pattern match."; } feature structured-data { description "This feature represents the ability to log messages in structured-data format as per RFC 5424."; } feature signed-messages { description "This feature represents the ability to configure signed syslog messages according to RFC 5848."; } - grouping log-severity { + grouping severity-filter { description - "This grouping defines the severity value that is used to - select log messages."; + "This grouping defines the processing used to select + log messages by comparing syslog message severity using + the following processing rules: + - if 'none', do not match. + - if 'all', match. + - else compare message severity with the specified severity + according to the default compare rule (all messages of the + specified severity and greater match) or if the + select-adv-compare feature is present, the advance-compare + rule."; leaf severity { type union { type syslogtypes:severity; type enumeration { enum none { value -2; description "This enum describes the case where no severities are selected."; } enum all { value -1; description "This enum describes the case where all severities 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 - 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."; + "This leaf specifies the syslog message severity."; } - leaf compare { + container advanced-compare { when '../severity != "all" and ../severity != "none"' { description - "The compare leaf is not applicable for severity 'all' or - severity 'none'"; + "The advanced compare container is not applicable for severity + 'all' or severity 'none'"; } - if-feature select-sev-compare; + if-feature select-adv-compare; + leaf compare { type enumeration { + enum equals { + description + "This enum specifies that the severity comparison operation + will be equals."; + } enum equals-or-higher { description - "This enum specifies all messages of the specified - severity and higher are logged according to the - given log-action"; + "This enum specifies that the severity comparison operation + will be equals or higher."; } - enum equals { + } + default equals-or-higher; description - "This enum specifies all messages that are for - the specified severity are logged according to the - given log-action"; + "The compare can be used to specify the comparison operator that + should be used to compare the syslog message severity with the + specified severity."; } - enum not-equals { + leaf action { + type enumeration { + enum log { description - "This enum specifies all messages that are not for - the specified severity are logged according to the - given log-action"; + "This enum specifies that if the compare operation is true + the message will be logged."; } + enum block { + description + "This enum specifies that if the compare operation is true + the message will not be logged."; } - default equals-or-higher; + } + default log; description - "This leaf describes the option to specify how the - severity comparison is performed."; + "The action can be used to spectify if the message should be + logged or blocked based on the outcome of the compare operation."; + } + description + "This leaf describes additional severity compare operations that can + be used in place of the default severity comparison. The compare leaf + specifies the type of the compare that is done and the action leaf + specifies the intended result. Example: compare->equals and action-> + no-match means messages that have a severity that is not equal to the + specified severity will be logged."; } } grouping selector { description "This grouping defines a syslog selector which is used to select log messages for the log-action (console, file, - remote, etc). Choose one of the following: - no-facility - facility [ ...]"; + remote, etc.). Choose one or both of the following: + facility [ ...] + pattern-match regular-expression-match-string + If both facility and pattern-match are specified, both must + match in order for a log message to be selected."; container selector { description "This container describes the log selector parameters for syslog."; - choice selector-facility { - mandatory true; - description - "This choice describes the option to specify no - facilities, or a specific facility which can be - all for all facilities."; - case facility { - description - "This case specifies no facilities will match when - comparing the syslog message facility. This is a - method that can be used to effectively disable a - particular log-action (buffer, file, etc)."; - leaf no-facilities { - type empty; - description - "This leaf specifies that no facilities are selected - for this log-action."; - } - } - case name { - description - "This case specifies one or more specified facilities - will match when comparing the syslog message facility."; list facility-list { - key facility; + key "facility severity"; + ordered-by user; description "This list describes a collection of syslog facilities and severities."; leaf facility { type union { type identityref { base syslogtypes:syslog-facility; } type enumeration { enum all { description "This enum describes the case where all facilities are requested."; } } } description "The leaf uniquely identifies a syslog facility."; } - uses log-severity; - } - } + uses severity-filter; } leaf pattern-match { if-feature select-match; type string; description - "This leaf desribes a Posix 1003.2 regular expression + "This leaf describes a Posix 1003.2 regular expression string that can be used to select a syslog message for logging. The match is performed on the RFC 5424 SYSLOG-MSG field."; } } } - grouping structured-data { description "This grouping defines the syslog structured data option which is used to select the format used to write log messages."; leaf structured-data { if-feature structured-data; type boolean; default false; description @@ -928,57 +886,29 @@ container syslog { presence "Enables logging."; description "This container describes the configuration parameters for syslog."; container actions { description "This container describes the log-action parameters for syslog."; container console { - presence "Enables logging console configuration"; + if-feature console-action; + presence "Enables logging to the console"; description "This container describes the configuration parameters for console logging."; uses 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 method used to read syslog messages - from the buffer is supplied by the local implementation."; - uses selector; - uses structured-data; - leaf buffer-limit-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."; - } - leaf buffer-limit-messages { - if-feature buffer-limit-messages; - type uint64; - units "log messages"; - description - "This leaf configures the number of log messages that - will be dedicated to the local memory logging buffer. - The default value varies by implementation."; - } - } container file { + if-feature file-action; description "This container describes the configuration parameters for file logging. If file-archive limits are not supplied, it is assumed that the local implementation defined limits will be used."; list log-file { key "name"; description "This list describes a collection of local logging files."; @@ -992,56 +923,58 @@ } uses selector; uses structured-data; container file-rotation { description "This container describes the configuration parameters for log file rotation."; leaf number-of-files { if-feature file-limit-size; type uint32; + default 1; description "This leaf specifies the maximum number of log files retained. Specify 1 for implementations that only support one log file."; } leaf max-file-size { if-feature file-limit-size; - type uint64; + type uint32; units "megabytes"; description "This leaf specifies the maximum log file size."; } leaf rollover { if-feature file-limit-duration; type uint32; units "minutes"; description "This leaf specifies the length of time that log events should be written to a specific log file. Log events that arrive after the rollover period cause the current log file to be closed and a new log file to be opened."; } leaf retention { if-feature file-limit-duration; - type uint16; + type uint32; units "hours"; description "This leaf specifies the length of time that completed/closed log event files should be stored in the file system before they are deleted."; } } } } container remote { + if-feature remote-action; description "This container describes the configuration parameters for forwarding syslog messages to remote relays or collectors."; list destination { key "name"; description "This list describes a collection of remote logging destinations."; leaf name { type string; @@ -1106,20 +1039,21 @@ leaf facility-override { type identityref { base syslogtypes:syslog-facility; } description "If specified, this leaf specifies the facility used to override the facility in messages delivered to the remote server."; } leaf source-interface { + if-feature remote-source-interface; type if:interface-ref; description "This leaf sets the source interface to be used to send message to the remote syslog server. If not set, messages sent to a remote syslog server will contain the IP address of the interface the syslog message uses to exit the network element"; } container signing-options { if-feature signed-messages; @@ -1191,53 +1125,28 @@ description "This leaf specifies when to send the next Signature Block transmission based on a count. If this many other syslog messages have been sent since the previous sending of this Signature Block, resend it."; } } } } - container session { - description - "This container describes the configuration parameters for - 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 selector; - } - list user { - key "name"; - description - "This list describes a collection of user names."; - 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 selector; - } - } } } } - Figure 4. ietf-syslog Module 5. Usage Examples + Requirement: Enable console logging of syslogs of severity critical Here is the example syslog configuration xml: @@ -1237,21 +1146,21 @@ Here is the example syslog configuration xml: all critical - + Enable remote logging of syslogs to udp destination 2001:db8:a0b:12f0::1 for facility auth, severity error @@ -1263,36 +1172,38 @@ remote1
2001:db8:a0b:12f0::1
syslogtypes:auth error - - + +
Figure 5. ietf-syslog Examples 6. Acknowledgements The authors wish to thank the following who commented on this proposal: + Andy Bierman Martin Bjorklund + Alex Campbell Jim Gibson Jeffrey Haas John Heasley Giles Heron Lisa Huang Mahesh Jethanandani Jeffrey K Lange Jan Lindblad Chris Lonvick Tom Petch @@ -1367,80 +1279,79 @@ Network administrators must take the time to estimate the appropriate storage capacity caused by the configuration of actions/file using file-archive attributes to limit storage used. It is the responsibility of the network administrator to ensure that the configured message flow does not overwhelm system resources. 8.2. Inappropriate Configuration - It is the responsibility of the network admisintrator to ensure that + It is the responsibility of the network administrator to ensure that the messages are actually going to the intended recipients. 9. References 9.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", BCP 14, RFC 2119, - DOI 10.17487/RFC2119, March 1997, - . + Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ + RFC2119, March 1997, . - [RFC5424] Gerhards, R., "The Syslog Protocol", RFC 5424, - DOI 10.17487/RFC5424, March 2009, - . + [RFC5424] Gerhards, R., "The Syslog Protocol", RFC 5424, DOI + 10.17487/RFC5424, March 2009, . [RFC5426] Okmianski, A., "Transmission of Syslog Messages over UDP", - RFC 5426, DOI 10.17487/RFC5426, March 2009, - . + RFC 5426, DOI 10.17487/RFC5426, March 2009, . - [RFC5848] Kelsey, J., Callas, J., and A. Clemm, "Signed Syslog + [RFC5848] Kelsey, J., Callas, J. and A. Clemm, "Signed Syslog Messages", RFC 5848, DOI 10.17487/RFC5848, May 2010, . [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, - DOI 10.17487/RFC6020, October 2010, - . + DOI 10.17487/RFC6020, October 2010, . - [RFC6021] Schoenwaelder, J., Ed., "Common YANG Data Types", - RFC 6021, DOI 10.17487/RFC6021, October 2010, - . + [RFC6021] Schoenwaelder, J., Ed., "Common YANG Data Types", RFC + 6021, DOI 10.17487/RFC6021, October 2010, . [RFC6587] Gerhards, R. and C. Lonvick, "Transmission of Syslog Messages over TCP", RFC 6587, DOI 10.17487/RFC6587, April 2012, . [RFC7223] Bjorklund, M., "A YANG Data Model for Interface Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, . 9.2. Informative References [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, - DOI 10.17487/RFC3688, January 2004, - . + DOI 10.17487/RFC3688, January 2004, . - [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., + [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J.Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, . [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, . Appendix A. Implementor Guidelines -A.1. Extending Facilities - +Appendix A.1. Extending Facilities Many vendors extend the list of facilities available for logging in their implementation. Additional facilities may not work with the syslog protocol as defined in [RFC5424] and hence such facilities apply for local syslog-like logging functionality. The following is an example that shows how additional facilities could be added to the list of available facilities (in this example two facilities are added): module vendor-syslog-types-example { @@ -1472,27 +1383,27 @@ identity vendor_specific_type_1 { base syslogtypes:syslog-facility; } identity vendor_specific_type_2 { base syslogtypes:syslog-facility; } } Authors' Addresses - - Clyde Wildes (editor) + 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) + + Kiran Koushik, editor Cisco Systems Inc. 12515Research Blvd., Building 4 Austin, TX 78759 US Phone: +1 512 378-1482 Email: kkoushik@cisco.com