<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc linkmailto="no" ?>
<?rfc editing="no" ?>
<?rfc comments="yes" ?>
<?rfc inline="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc-ext allow-markup-in-artwork="yes" ?>
<?rfc-ext include-index="no" ?>

<!--<?rfc strict="no"?> -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" consensus="true" number="9999" ipr="trust200902" submissionType="IETF" sortRefs="true" xml:lang="en" version="3">
  <!-- xml2rfc v2v3 conversion 2.22.3 -->
  <front>

    <title abbrev="Syslog Management">A YANG Data Model for Syslog
    Configuration</title>

    <seriesInfo name="RFC" value="9999"/>
    
    <author fullname="Clyde Wildes" initials="C" role="editor" surname="Wildes">
      <organization>Cisco Systems Inc.</organization>
      <address>
        <postal>
          <street>170 West Tasman Drive</street>
          <city>San Jose</city>
          <region>CA</region>
          <code>95134</code>
          <country>US</country>
        </postal>
        <phone>+1 408 527-2672</phone>
        <email>cwildes@cisco.com</email>
      </address>
    </author>
    <author fullname="Kiran Koushik" initials="K" role="editor" surname="Koushik">
      <organization>Verizon Wireless</organization>
      <address>
        <postal>
          <street>500 W Dove Rd.</street>
          <city>Southlake</city>
          <region>TX</region>
          <code>76092</code>
          <country>US</country>
        </postal>
        <phone>+1 512 650-0210</phone>
        <email>kirankoushik.agraharasreenivasa@verizonwireless.com</email>
      </address>
    </author>
    <date day="15" month="March" year="2018"/>
    <area>General</area>
    <workgroup>NETMOD WG</workgroup>
    <abstract>
      <t>This document defines a YANG data model for the configuration of a
      syslog process. It is intended this model be used by vendors who
      implement syslog in their systems.</t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <t>This document defines a YANG <xref target="RFC7950" format="default"/> configuration
      data model that may be used to configure the syslog feature running on a
      system. YANG models can be used with network management protocols such
      as NETCONF <xref target="RFC6241" format="default"/> to install, manipulate, and delete
      the configuration of network devices.</t>
      <t>The data model makes use of the YANG "feature" construct which allows
      implementations to support only those syslog features that lie within
      their capabilities.</t>
      <t>This module can be used to configure the syslog application
      conceptual layers as implemented on the target system.</t>
      <t>Essentially, a syslog process receives messages (from the kernel,
      processes, applications or other syslog processes) and processes them.
      The processing may involve logging to a local file, and/or displaying 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.</t>
      <t>Such definitions of syslog protocol are defined in <xref target="RFC5424" format="default"/>, and are used in this RFC.</t>
      <t>The YANG model in this document conforms to the Network Management
      Datastore Architecture defined in
      [draft-ietf-netmod-revised-datastores].</t>
      <section numbered="true" toc="default">
        <name>Requirements Language</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
        "OPTIONAL" in this document are to be interpreted as described in BCP
        14 <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/> when, and only
        when, they appear in all capitals, as shown here.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Terminology</name>
        <t>The term "originator" is defined in <xref target="RFC5424" format="default"/>: an
        "originator" generates syslog content to be carried in a message.</t>
        <t>The term "relay" is defined in <xref target="RFC5424" format="default"/>: a "relay"
        forwards messages, accepting messages from originators or other relays
        and sending them to collectors or other relays</t>
        <t>The term "collectors" is defined in <xref target="RFC5424" format="default"/>: a
        "collector" gathers syslog content for further analysis.</t>
        <t>The term "action" refers to the processing that takes place for
        each syslog message received.</t>
      </section>
      <section numbered="true" toc="default">
        <name>NDMA Compliance</name>
        <t>The YANG model in this document conforms to the Network Management
        Datastore Architecture defined in <xref target="I-D.ietf-netmod-revised-datastores" format="default">I-D.ietf-netmod-revised-datastores</xref>.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Editorial Note (To be removed by RFC Editor)</name>
        <t>This document contains many placeholder values that need to be
        replaced with finalized values at the time of publication. This note
        summarizes all of the substitutions that are needed. No other RFC
        Editor instructions are specified elsewhere in this document.</t>
        <t>Artwork in this document contains shorthand references to drafts in
        progress. Please apply the following replacements: </t>
        <ul spacing="normal">
          <li>
            <tt>I-D.ietf-netconf-keystore</tt> --&gt;
            the assigned RFC value for draft-ietf-netconf-keystore</li>
          <li>
            <tt>I-D.ietf-netconf-tls-client-server</tt>
            --&gt; the assigned RFC value for
            draft-ietf-netconf-tls-client-server</li>
          <li>
            <tt>zzzz</tt> --&gt; the assigned RFC value
            for this draft</li>
          <li>I-D.ietf-netmod-revised-datastores --&gt; the assigned RFC
            value for draft-ietf-netmod-revised-datastores</li>
        </ul>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Design of the Syslog Model</name>
      <t>The syslog model was designed by comparing various syslog features
      implemented by various vendors' in different implementations.</t>
      <t>This document addresses the common leafs between implementations and
      creates a common model, which can be augmented with proprietary
      features, if necessary. This model is designed to be very simple for
      maximum flexibility.</t>
      <t>Some optional features are defined in this document to specify
      functionality that is present in specific vendor configurations.</t>
      <t>Syslog consists of originators and collectors. The following diagram
      shows syslog messages flowing from originators, to collectors where
      filtering can take place.</t>
      <figure anchor="fig1">
	<name>Syslog Processing Flow</name>
	<artwork align="left" name="" type="" alt="">
	<![CDATA[
Originators  
  +-------------+  +-------------+  +-------------+  +-------------+
  |  Various    |  |     OS      |  |             |  |   Remote    |
  | Components  |  |   Kernel    |  | Line Cards  |  |   Servers   |
  +-------------+  +-------------+  +-------------+  +-------------+  

  +-------------+  +-------------+  +-------------+  +-------------+
  |    SNMP     |  |  Interface  |  |   Standby   |  |   Syslog    |
  |   Events    |  |   Events    |  |  Supervisor |  |   Itself    |
  +-------------+  +-------------+  +-------------+  +-------------+

  |                                                                |
  +----------------------------------------------------------------+
               |
               |
               |
               |
       +-------------+--------------+
       |             |              |
       v             v              v
Collectors                                     
  +----------+ +----------+ +----------------+       
  |          | |  Log     | |Remote Relay(s)/|     
  | Console  | |  File(s) | |Collector(s)    |     
  +----------+ +----------+ +----------------+     
       ]]></artwork></figure>
 
      <t>Collectors are configured using the leaves in the syslog model
      "actions" container which correspond to each message collector:</t>
      <ul empty="true" spacing="normal">
        <li>console</li>
        <li>log file(s)</li>
        <li>remote relay(s)/collector(s)</li>
      </ul>
      <t>Within each action, a selector is used to filter syslog messages. A
      selector consists of a list of one or more filters specified by
      facility-severity pairs, and, if supported via the select-match feature,
      an optional regular expression pattern match that is performed on the
      <xref target="RFC5424" format="default"/> field.</t>
      <t>A syslog message is processed if:</t>

      <ul>
    
       <li>There is an element of facility-list (F, S) where
           the message facility matches F
           and the message severity matches S
       and/or the message text matches the regex pattern (if it 
       is present)</li></ul>
   


      
      <t>The facility is one of a specific syslog-facility, or all
      facilities.</t>
      <t>The severity is one of type syslog-severity, all severities, or none.
      None is a special case that can be used to disable a filter. When
      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
      operation 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 used to log
      the message or block the message from being logged.</t>
      <t>Many vendors extend the list of facilities available for logging in
      their implementation. An example is included in Extending Facilities
      (Appendix A.1).</t>
      <section numbered="true" toc="default">
        <name>Syslog Module</name>
        <t>A simplified graphical representation of the data model is used in
        this document. Please see [I-D.ietf-netmod-yang-tree-diagrams] for
        tree diagram notation.</t>
	<figure anchor="Fig2">
	  <name>ietf-syslog Module Tree</name>
        <artwork name="" type="" align="left" alt="" ><![CDATA[
module: ietf-syslog
   +--rw syslog!
      +--rw actions
         +--rw console! {console-action}?
         |  +--rw facility-filter
         |  |  +--rw facility-list* [facility severity]
         |  |     +--rw facility            union
         |  |     +--rw severity            union
         |  |     +--rw advanced-compare {select-adv-compare}?
         |  |        +--rw compare?   enumeration
         |  |        +--rw action?    enumeration
         |  +--rw pattern-match?     string {select-match}?
         +--rw file {file-action}?
         |  +--rw log-file* [name]
         |     +--rw name               inet:uri
         |     +--rw facility-filter
         |     |  +--rw facility-list* [facility severity]
         |     |     +--rw facility            union
         |     |     +--rw severity            union
         |     |     +--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?     uint32 {file-limit-size}?
         |        +--rw rollover?          uint32
         |        |       {file-limit-duration}?
         |        +--rw retention?         uint32
         |                {file-limit-duration}?
         +--rw remote {remote-action}?
            +--rw destination* [name]
               +--rw name                 string
               +--rw (transport)
               |  +--:(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 client-auth
               |        |  +--rw (auth-type)?
               |        |     +--:(certificate)
               |        |        +--rw certificate?   leafref
               |        +--rw server-auth
               |        |  +--rw pinned-ca-certs?       leafref
               |        |  +--rw pinned-server-certs?   leafref
               |        +--rw hello-params
               |                {tls-client-hello-params-config}?
               |           +--rw tls-versions
               |           |  +--rw tls-version*   identityref
               |           +--rw cipher-suites
               |              +--rw cipher-suite*   identityref
               +--rw facility-filter
               |  +--rw facility-list* [facility severity]
               |     +--rw facility            union
               |     +--rw severity            union
               |     +--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 facility-override?   identityref
               +--rw source-interface?    if:interface-ref
               |       {remote-source-interface}?
               +--rw signing! {signed-messages}?
                  +--rw cert-signers
                     +--rw cert-signer* [name]
                     |  +--rw name              string
                     |  +--rw cert
                     |  |  +--rw algorithm?
                     |  |  |       identityref
                     |  |  +--rw private-key?
                     |  |  |       union
                     |  |  +--rw public-key?
                     |  |  |       binary
                     |  |  +---x generate-private-key
                     |  |  |  +---w input
                     |  |  |     +---w algorithm?
                     |  |  |             identityref
                     |  |  +--rw certificates
                     |  |  |  +--rw certificate* [name]
                     |  |  |     +--rw name     string
                     |  |  |     +--rw value?   binary
                     |  |  +---x generate-certificate-signing-request
                     |  |     +---w input
                     |  |     |  +---w subject       binary
                     |  |     |  +---w attributes?   binary
                     |  |     +--ro output
                     |  |        +--ro certificate-signing-request
                     |  |                binary
                     |  +--rw hash-algorithm?   enumeration
                     +--rw cert-initial-repeat?   uint32
                     +--rw cert-resend-delay?     uint32
                     +--rw cert-resend-count?     uint32
                     +--rw sig-max-delay?         uint32
                     +--rw sig-number-resends?    uint32
                     +--rw sig-resend-delay?      uint32
                     +--rw sig-resend-count?      uint32]]></artwork></figure>
      
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Syslog YANG Module</name>
      <section numbered="true" toc="default">
        <name>The ietf-syslog Module</name>
        <t>This module imports typedefs from <xref target="RFC6991" format="default"/>,
        <xref target="I-D.ietf-netmod-rfc7223bis" format="default"/>, groupings from
        <xref target="RFCYYYY" format="default"/>, and 
        <xref target="I-D.ietf-netconf-tls-client-server" format="default"/>, and it references
        <xref target="RFC5424" format="default"/>, <xref target="RFC5425" format="default"/>, 
        <xref target="RFC5426" format="default"/>, <xref target="RFC5848" format="default"/>, 
        <xref target="RFC8089" format="default"/>, <xref target="RFC8174" format="default"/>, and 
        <xref target="Std-1003.1-2008" format="default"/>.</t>
	
        <sourcecode name="ietf-syslog@2018-03-15.yang" type="yang" markers="true">
	  <![CDATA[
module ietf-syslog {
  yang-version 1.1;

  namespace "urn:ietf:params:xml:ns:yang:ietf-syslog";
  prefix syslog;

  import ietf-inet-types {
    prefix inet;
    reference
      "RFC 6991: Common YANG Data Types";
  }

  import ietf-interfaces {
    prefix if;
    reference
      "I-D.ietf-netmod-rfc7223bis: A YANG Data Model 
       for Interface Management";
  }

  import ietf-tls-client {
    prefix tlsc;
    reference
      "I-D.ietf-netconf-tls-client-server: 
       YANG Groupings for TLS Clients and TLS Servers";
  }

  import ietf-keystore {
    prefix ks;
    reference
      "I-D.ietf-netconf-keystore: YANG Data Model for a
       Keystore Mechanism";
  }

  organization 
      "IETF NETMOD (Network Modeling) Working Group";

  contact
    "WG Web:   <http://tools.ietf.org/wg/netmod/>
     WG List:  <mailto:netmod@ietf.org>
     
     Editor:   Kiran Agrahara Sreenivasa
               <mailto:kirankoushik.agraharasreenivasa@
                       verizonwireless.com>
     
     Editor:   Clyde Wildes
               <mailto:cwildes@cisco.com>";
  description
    "This module contains a collection of YANG definitions 
     for syslog configuration.

     Copyright (c) 2018 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 zzzz
     (http://tools.ietf.org/html/rfczzzz); see the RFC itself for
     full legal notices.";

  revision 2018-03-15 {
    description
      "Initial Revision";
    reference
      "RFC zzzz: Syslog YANG Model";
  }

  feature console-action {
    description
      "This feature indicates that the local console action is 
       supported.";
  }

  feature file-action {
    description
      "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 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 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.";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  feature signed-messages {
    description
      "This feature represents the ability to configure signed 
       syslog messages.";
    reference
      "RFC 5848: Signed Syslog Messages";
  }

  typedef syslog-severity {
      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
          "The severity level 'Critical' indicating a critical 
           condition.";
      }
      enum "error" {
        value 3;
        description
          "The severity level 'Error' indicating an error 
           condition.";
      }
      enum "warning" {
        value 4;
        description
          "The severity level 'Warning' indicating a warning 
           condition.";
      }
      enum "notice" {
        value 5;
        description
          "The severity level 'Notice' indicating a normal but 
           significant condition.";
      }
      enum "info" {
        value 6;
        description
          "The severity level 'Info' indicating an informational 
           message.";
      }
      enum "debug" {
        value 7;
        description
          "The severity level 'Debug' indicating a debug-level 
           message.";
      }
    }
    description
      "The definitions for Syslog message severity. 
       Note that a lower value is a higher severity. Comparisons of 
       equal-or-higher severity mean equal or lower numeric value";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity syslog-facility {
    description
      "This identity is used as a base for all syslog facilities.";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity kern {
    base syslog-facility;
    description
      "The facility for kernel messages (0).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity user {
    base syslog-facility;
    description
      "The facility for user-level messages (1).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity mail {
    base syslog-facility;
    description
      "The facility for the mail system (2).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity daemon {
    base syslog-facility;
    description
      "The facility for the system daemons (3).";
    reference
      "RFC 5424: The Syslog Protocol";
   }

  identity auth {
    base syslog-facility;
    description
      "The facility for security/authorization messages (4).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity syslog {
    base syslog-facility;
    description
      "The facility for messages generated internally by syslogd 
       facility (5).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity lpr {
    base syslog-facility;
    description
      "The facility for the line printer subsystem (6).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity news {
    base syslog-facility;
    description
      "The facility for the network news subsystem (7).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity uucp {
    base syslog-facility;
    description
      "The facility for the UUCP subsystem (8).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity cron {
    base syslog-facility;
    description
      "The facility for the clock daemon (9).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity authpriv {
    base syslog-facility;
    description
      "The facility for privileged security/authorization messages 
       (10).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity ftp {
    base syslog-facility;
    description
      "The facility for the FTP daemon (11).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity ntp {
    base syslog-facility;
    description
      "The facility for the NTP subsystem (12).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity audit {
    base syslog-facility;
    description
      "The facility for log audit messages (13).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity console {
    base syslog-facility;
    description
      "The facility for log alert messages (14).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity cron2 {
    base syslog-facility;
    description
      "The facility for the second clock daemon (15).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity local0 {
    base syslog-facility;
    description
      "The facility for local use 0 messages (16).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity local1 {
    base syslog-facility;
    description
      "The facility for local use 1 messages (17).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity local2 {
    base syslog-facility;
    description
      "The facility for local use 2 messages (18).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity local3 {
    base syslog-facility;
    description
      "The facility for local use 3 messages (19).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity local4 {
    base syslog-facility;
    description
      "The facility for local use 4 messages (20).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity local5 {
    base syslog-facility;
    description
      "The facility for local use 5 messages (21).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity local6 {
    base syslog-facility;
    description
      "The facility for local use 6 messages (22).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  identity local7 {
    base syslog-facility;
    description
      "The facility for local use 7 messages (23).";
    reference
      "RFC 5424: The Syslog Protocol";
  }

  grouping severity-filter {
    description
      "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, use the 
          advance-compare rule.";
    leaf severity {
      type union {
        type syslog-severity;
        type enumeration {
          enum none {
            value 2147483647;
            description
              "This enum describes the case where no severities 
               are selected.";
          }
          enum all {
            value -2147483648;
            description
              "This enum describes the case where all severities 
               are selected.";
          }
        }
      }
      mandatory true;
      description
        "This leaf specifies the syslog message severity.";
    }
    container advanced-compare {
      when '../severity != "all" and
           ../severity != "none"' {
        description
          "The advanced compare container is not applicable for 
           severity 'all' or severity 'none'";
      }
      if-feature select-adv-compare;
      leaf compare {
        type enumeration {
          enum equals {
            description
              "This enum specifies that the severity comparison 
               operation will be equals.";
          }
          enum equals-or-higher {
            description
              "This enum specifies that the severity comparison 
               operation will be equals or higher.";
          }
        }
        default equals-or-higher;
        description
          "The compare can be used to specify the comparison 
           operator that should be used to compare the syslog message 
           severity with the specified severity.";
      }
      leaf action {
        type enumeration {
          enum log {
            description
              "This enum specifies that if the compare operation is 
               true the message will be logged.";
           }
          enum block {
            description
              "This enum specifies that if the compare operation is 
               true the message will not be logged.";
          }
        }
        default log;
        description
          "The action can be used to specify if the message should 
           be logged or blocked based on the outcome of the compare 
           operation.";
      }
      description
        "This container describes additional severity compare 
         operations that can be used in place of the default 
         severity comparison. The compare leaf specifies the type of 
         the compare that is done and the action leaf specifies the 
         intended result. 
         Example: compare->equals and action->block means 
         messages that have a severity that are equal to the 
         specified severity will not be logged.";
    }
  }

  grouping selector {
    description
      "This grouping defines a syslog selector which is used to 
       select log messages for the log-actions (console, file, 
       remote, etc.). Choose one or both of the following:
         facility [<facility> <severity>...]
         pattern-match regular-expression-match-string
       If both facility and pattern-match are specified, both must 
       match in order for a log message to be selected.";
    container facility-filter {
      description
        "This container describes the syslog filter parameters.";
      list facility-list {
        key "facility severity";
        ordered-by user;
        description
          "This list describes a collection of syslog 
           facilities and severities.";
        leaf facility {
          type union {
            type identityref {
              base syslog-facility;
            }
            type enumeration {
              enum all {
                description
                  "This enum describes the case where all 
                   facilities are requested.";
              }
            }
          }
          description
            "The leaf uniquely identifies a syslog facility.";
        }
        uses severity-filter;
      }
    }
    leaf pattern-match {
      if-feature select-match;
      type string;
      description
        "This leaf describes a Posix 1003.2 regular expression 
         string that can be used to select a syslog message for 
         logging. The match is performed on the SYSLOG-MSG field.";
      reference
        "RFC 5424: The Syslog Protocol
         Std-1003.1-2008 Regular Expressions";
    }
  }

  grouping structured-data {
    description
      "This grouping defines the syslog structured data option 
       which is used to select the format used to write log 
       messages.";
    leaf structured-data {
      if-feature structured-data;
      type boolean;
      default false;
      description
        "This leaf describes how log messages are written. 
         If true, messages will be written with one or more 
         STRUCTURED-DATA elements; if false, messages will be 
         written with STRUCTURED-DATA = NILVALUE.";
      reference
        "RFC 5424: The Syslog Protocol";
    }
  }

  container syslog {
    presence "Enables logging.";
    description
      "This container describes the configuration parameters for 
       syslog.";
    container actions {
      description
        "This container describes the log-action parameters 
         for syslog.";
      container console {
        if-feature console-action;
        presence "Enables logging to the console";
        description
          "This container describes the configuration parameters 
           for console logging.";
        uses selector;
      }
      container file {
        if-feature file-action;
        description
          "This container describes the configuration parameters for 
           file logging. If file-archive limits are not supplied, it
           is assumed that the local implementation defined limits 
           will be used.";
        list log-file {
          key "name";
          description
            "This list describes a collection of local logging 
             files.";
          leaf name {
            type inet:uri {
              pattern 'file:.*';
            }
            description
              "This leaf specifies the name of the log file which 
               MUST use the uri scheme file:.";
            reference
                "RFC 8089: The file URI Scheme";
          }
          uses selector;
          uses structured-data;
          container file-rotation {
            description
              "This container describes the configuration 
               parameters for log file rotation.";
            leaf number-of-files {
              if-feature file-limit-size;
              type uint32;
              default 1;
              description
                "This leaf specifies the maximum number of log 
                 files retained. Specify 1 for implementations 
                 that only support one log file.";
            }
            leaf max-file-size {
              if-feature file-limit-size;
              type uint32;
              units "megabytes";
              description
                "This leaf specifies the maximum log file size.";
            }
            leaf rollover {
              if-feature file-limit-duration;
              type uint32;
              units "minutes";
              description
                "This leaf specifies the length of time that log 
                 events should be written to a specific log file. 
                 Log events that arrive after the rollover period 
                 cause the current log file to be closed and a new 
                 log file to be opened.";
            }
            leaf retention {
              if-feature file-limit-duration;
              type uint32;
              units "minutes";
              description
                "This leaf specifies the length of time that 
                 completed/closed log event files should be stored 
                 in the file system before they are removed.";
            }
          }
        }
      }
      container remote {
        if-feature remote-action;
        description
          "This container describes the configuration parameters 
           for forwarding syslog messages to remote relays or 
           collectors.";
        list destination {
          key "name";
          description
            "This list describes a collection of remote logging 
             destinations.";
          leaf name {
            type string;
            description
              "An arbitrary name for the endpoint to connect to.";
          }
          choice transport {
            mandatory true;
            description
              "This choice describes the transport option.";
            case udp {
              container udp {
                description
                  "This container describes the UDP transport
                   options.";
                reference
                  "RFC 5426: Transmission of Syslog Messages over 
                   UDP";
                leaf address {
                  type inet:host;
                  description
                    "The leaf uniquely specifies the address of 
                     the remote host. One of the following must be 
                     specified: an ipv4 address, an ipv6 address, 
                     or a host name.";
                }
                leaf port {
                  type inet:port-number;
                  default 514;
                  description
                    "This leaf specifies the port number used to 
                     deliver messages to the remote server.";
                }
              }
            }
            case tls {
              container tls {
                description
                  "This container describes the TLS transport 
                   options.";
                reference
                  "RFC 5425: Transport Layer Security (TLS) 
                   Transport Mapping for Syslog ";
                leaf address {
                  type inet:host;
                  description
                    "The leaf uniquely specifies the address of 
                     the remote host. One of the following must be 
                     specified: an ipv4 address, an ipv6 address, 
                     or a host name.";
                }
                leaf port {
                  type inet:port-number;
                  default 6514;
                  description
                    "TCP port 6514 has been allocated as the default 
                     port for syslog over TLS.";
                }
                uses tlsc:tls-client-grouping;
              }
            }
          }
          uses selector;
          uses structured-data;
          leaf facility-override {
            type identityref {
              base syslog-facility;
            }
            description
              "If specified, this leaf specifies the facility used 
               to override the facility in messages delivered to 
               the remote server.";
          }
          leaf source-interface {
            if-feature remote-source-interface;
            type if:interface-ref;
            description
              "This leaf sets the source interface to be used to 
               send messages to the remote syslog server. If not 
               set, messages can be sent on any interface.";
          }
          container signing {
            if-feature signed-messages;
            presence
              "If present, syslog-signing options is activated.";
            description
              "This container describes the configuration 
               parameters for signed syslog messages.";
            reference
              "RFC 5848: Signed Syslog Messages";
            container cert-signers {
              description
                "This container describes the signing certificate 
                 configuration for Signature Group 0 which covers 
                 the case for administrators who want all Signature 
                 Blocks to be sent to a single destination.";
              list cert-signer {
                key "name";
                description
                  "This list describes a collection of syslog 
                   message signers.";
                leaf name {
                  type string;
                  description
                    "This leaf specifies the name of the syslog 
                     message signer.";
                }
                container cert {
                  uses ks:private-key-grouping;
                  uses ks:certificate-grouping; 
                  description
                   "This is the certificate that is periodically 
                    sent to the remote receiver. Selection of the 
                    certificate also implicitly selects the private 
                    key used to sign the syslog messages.";
                }
                leaf hash-algorithm {
                  type enumeration {
                    enum SHA1 {
                      value 1;
                      description
                        "This enum describes the SHA1 algorithm.";
                    }
                    enum SHA256 {
                      value 2;
                      description
                        "This enum describes the SHA256 algorithm.";
                    }
                  }
                  description
                    "This leaf describes the syslog signer hash 
                     algorithm used.";
                }
              }
              leaf cert-initial-repeat {
                type uint32;
                default 3;
                description
                "This leaf specifies the number of times each 
                 Certificate Block should be sent before the first 
                 message is sent.";
              }
              leaf cert-resend-delay {
                type uint32;
                units "seconds";
                default 3600;
                description
                  "This leaf specifies the maximum time delay in 
                   seconds until resending the Certificate Block.";
              }
              leaf cert-resend-count {
                type uint32;
                default 0;
                description
                  "This leaf specifies the maximum number of other 
                   syslog messages to send until resending the 
                   Certificate Block.";
              }
              leaf sig-max-delay {
                type uint32;
                units "seconds";
                default 60;
                description
                  "This leaf specifies when to generate a new 
                   Signature Block. If this many seconds have 
                   elapsed since the message with the first message 
                   number of the Signature Block was sent, a new 
                   Signature Block should be generated.";
              }
              leaf sig-number-resends {
                type uint32;
                default 0;
                description
                  "This leaf specifies the number of times a 
                   Signature Block is resent. (It is recommended to 
                   select a value of greater than 0 in particular 
                   when the UDP transport RFC 5426 is used.).";
              }
              leaf sig-resend-delay {
                type uint32;
                units "seconds";
                default 5;
                description
                  "This leaf specifies when to send the next 
                   Signature Block transmission based on time. If 
                   this many seconds have elapsed since the previous 
                   sending of this Signature Block, resend it.";
              }
              leaf sig-resend-count {
                type uint32;
                default 0;
                description
                  "This leaf specifies when to send the next 
                   Signature Block transmission based on a count. 
                   If this many other syslog messages have been 
                   sent since the previous sending of this 
                   Signature Block, resend it. A value of 0 means 
                   that you don't resend based on the number of 
                   messages.";
              }
            }
          }
        }
      }
    }
  }
}
]]></sourcecode>
        <t>Figure 3. ietf-syslog Module</t>
      </section>
    </section>


    <section numbered="true" toc="default">
      <name>Usage Examples</name>

	<figure anchor="fig4">
  <name>ietf-syslog Examples</name>
  <artwork>
    Requirement:
    Enable console logging of syslogs of severity critical</artwork>

        <sourcecode type="xml"><![CDATA[
   <syslog xmlns="urn:ietf:params:xml:ns:yang:ietf-syslog">
     <actions>
       <console>
         <facility-filter>
           <facility-list>
             <facility>all</facility>
             <severity>critical</severity>
           </facility-list>
         </facility-filter>
       </console>
     </actions>
   </syslog>
   ]]></sourcecode>
      
   <artwork>Enable remote logging of syslogs to udp destination 
   foo.example.com for facility auth, severity error</artwork>
   
 <sourcecode type="xml"><![CDATA[
   <syslog xmlns="urn:ietf:params:xml:ns:yang:ietf-syslog">
     <actions>
       <remote>
         <destination>
           <name>remote1</name>
           <udp>
             <address>foo.example.com</address>
           </udp>
           <facility-filter>
             <facility-list>
               <facility>auth</facility>
               <severity>error</severity>
             </facility-list>
           </facility-filter>
         </destination>
       </remote>
     </actions>
   </syslog>
       ]]></sourcecode></figure>
  
    </section>

    <!-- Possibly a 'Contributors' section ... -->
    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section numbered="true" toc="default">
        <name>The IETF XML Registry</name>
        <t>This document registers one URI in the IETF XML registry <xref target="RFC3688" format="default"/>. Following the format in <xref target="RFC3688" format="default"/>,
        the following registration is requested:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   URI: urn:ietf:params:xml:ns:yang:ietf-syslog
   Registrant Contact: The IESG.
   XML: N/A, the requested URI is an XML namespace.
]]></artwork>
      </section>
      <section numbered="true" toc="default">
        <name>The YANG Module Names Registry</name>
        <t>This document registers one YANG module in the YANG Module Names
        registry <xref target="RFC7895" format="default"/>. Following the format in <xref target="RFC7950" format="default"/>, the following registration is requested:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   name:         ietf-syslog
   namespace:    urn:ietf:params:xml:ns:yang:ietf-syslog
   prefix:       ietf-syslog
   reference:    RFC zzzz

]]></artwork>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>The YANG module defined in this document is designed to be accessed
      via YANG based management protocols, such as NETCONF <xref target="RFC6241" format="default"/> and RESTCONF <xref target="RFC8040" format="default"/>. Both of these
      protocols have mandatory-to-implement secure transport layers (e.g.,
      SSH, TLS) with mutual authentication.</t>
      <t>The NETCONF access control model (NACM) <xref target="RFC6536" format="default"/>
      provides the means to restrict access for particular users to a
      pre-configured subset of all available protocol operations and
      content.</t>
      <t>There are a number of data nodes defined in this YANG module that are
      writable/creatable/deletable (i.e., config true, which is the default).
      These data nodes should be considered sensitive or vulnerable in all
      network environments. Logging in particular is used to assess the state
      of systems and can be used to indicate a network compromise. If logging
      were to be disabled through malicious means, attacks may not be readily
      detectable. Therefore write operations (e.g., edit-config) to these data
      nodes without proper protection can have a negative effect on network
      operations and on network security.</t>
      <t>In addition there are data nodes that require careful analysis and
      review. These are the subtrees and data nodes and their
      sensitivity/vulnerability: </t>
      <dl newline="false" spacing="normal" indent="6">
        <dt>   facility-filter/pattern-match:</dt>
        <dd>When writing this
          node, implementations MUST ensure that the regular expression
          pattern match is not constructed to cause a regular expression
          denial of service attack due to a pattern that causes the regular
          expression implementation to work very slowly (exponentially related
          to input size).</dd>
        <dt>   remote/destination/signing/cert-signer:</dt>
        <dd>When
          writing this subtree, implementations MUST NOT specify a private key
          that is used for any other purpose.</dd>
      </dl>
      <t>Some of the readable data nodes in this YANG module may be considered
      sensitive or vulnerable in some network environments. It is thus
      important to control read access (e.g., via get, get-config, or
      notification) to these data nodes. These are the subtrees and data nodes
      and their sensitivity/vulnerability: </t>
      <dl newline="false" spacing="normal" indent="6">
        <dt>   remote/destination/transport:</dt>
        <dd>This subtree contains
          information about other hosts in the network, and the TLS transport
          certificate properties if TLS is selected as the transport
          protocol.</dd>
        <dt>   remote/destination/signing:</dt>
        <dd>This subtree contains
          information about the syslog message signing properties including
          signing certificate information.</dd>
      </dl>
      <t>There are no RPC operations defined in this YANG module.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>


	
        <reference anchor="RFCYYYY" target="https://www.rfc-editor.org/info/rfcYYYY'">
          <front>
            <title>A YANG Data Model for a Keystore</title>
            <author initials="K" surname="Watsen" fullname="Kent Watsen">
              <organization/>
            </author>
            <date month="June" year="2019"/>
            <abstract>
              <t>This document defines a YANG 1.1 module called "ietf-keystore" that enables centralized configuration of asymmetric keys and their associated certificates, and notification for when configured certificates are about to expire.</t>
            </abstract>
          </front>
	  <seriesInfo name='RFC' value='YYYY' />
<seriesInfo name="DOI" value="10.17487/RFCYYYY"/>
        </reference>

	
        <reference anchor="I-D.ietf-netconf-tls-client-server" target="http://www.ietf.org/internet-drafts/draft-ietf-netconf-tls-client-server-13.txt">
          <front>
            <title>YANG Groupings for TLS Clients and TLS Servers</title>
            <seriesInfo name="Internet-Draft" value="draft-ietf-netconf-tls-client-server-13"/>
            <author initials="K" surname="Watsen" fullname="Kent Watsen">
              <organization/>
            </author>
            <author initials="G" surname="Wu" fullname="Gary Wu">
              <organization/>
            </author>
            <author initials="L" surname="Xia" fullname="Liang Xia">
              <organization/>
            </author>
            <date month="June" day="7" year="2019"/>
            <abstract>
              <t>This document defines three YANG modules: the first defines groupings for a generic TLS client, the second defines groupings for a generic TLS server, and the third defines common identities and groupings used by both the client and the server.  It is intended that these groupings will be used by applications using the TLS protocol.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <seriesInfo name="DOI" value="10.17487/RFC2119"/>
            <seriesInfo name="RFC" value="2119"/>
            <seriesInfo name="BCP" value="14"/>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC5424" target="https://www.rfc-editor.org/info/rfc5424">
          <front>
            <title>The Syslog Protocol</title>
            <seriesInfo name="DOI" value="10.17487/RFC5424"/>
            <seriesInfo name="RFC" value="5424"/>
            <author initials="R." surname="Gerhards" fullname="R. Gerhards">
              <organization/>
            </author>
            <date year="2009" month="March"/>
            <abstract>
              <t>This document describes the syslog protocol, which is used to convey event notification messages.  This protocol utilizes a layered architecture, which allows the use of any number of transport protocols for transmission of syslog messages.  It also provides a message format that allows vendor-specific extensions to be provided in a structured way.</t>
              <t>This document has been written with the original design goals for traditional syslog in mind.  The need for a new layered specification has arisen because standardization efforts for reliable and secure syslog extensions suffer from the lack of a Standards-Track and transport-independent RFC.  Without this document, each other standard needs to define its own syslog packet format and transport mechanism, which over time will introduce subtle compatibility issues.  This document tries to provide a foundation that syslog extensions can build on.  This layered architecture approach also provides a solid basis that allows code to be written once for each syslog feature rather than once for each transport.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC5425" target="https://www.rfc-editor.org/info/rfc5425">
          <front>
            <title>Transport Layer Security (TLS) Transport Mapping for Syslog</title>
            <seriesInfo name="DOI" value="10.17487/RFC5425"/>
            <seriesInfo name="RFC" value="5425"/>
            <author initials="F." surname="Miao" fullname="F. Miao" role="editor">
              <organization/>
            </author>
            <author initials="Y." surname="Ma" fullname="Y. Ma" role="editor">
              <organization/>
            </author>
            <author initials="J." surname="Salowey" fullname="J. Salowey" role="editor">
              <organization/>
            </author>
            <date year="2009" month="March"/>
            <abstract>
              <t>This document describes the use of Transport Layer Security (TLS) to provide a secure connection for the transport of syslog messages. This document describes the security threats to syslog and how TLS can be used to counter such threats.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC5426" target="https://www.rfc-editor.org/info/rfc5426">
          <front>
            <title>Transmission of Syslog Messages over UDP</title>
            <seriesInfo name="DOI" value="10.17487/RFC5426"/>
            <seriesInfo name="RFC" value="5426"/>
            <author initials="A." surname="Okmianski" fullname="A. Okmianski">
              <organization/>
            </author>
            <date year="2009" month="March"/>
            <abstract>
              <t>This document describes the transport for syslog messages over UDP/ IPv4 or UDP/IPv6.  The syslog protocol layered architecture provides for support of any number of transport mappings.  However, for interoperability purposes, syslog protocol implementers are required to support this transport mapping.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC5848" target="https://www.rfc-editor.org/info/rfc5848">
          <front>
            <title>Signed Syslog Messages</title>
            <seriesInfo name="DOI" value="10.17487/RFC5848"/>
            <seriesInfo name="RFC" value="5848"/>
            <author initials="J." surname="Kelsey" fullname="J. Kelsey">
              <organization/>
            </author>
            <author initials="J." surname="Callas" fullname="J. Callas">
              <organization/>
            </author>
            <author initials="A." surname="Clemm" fullname="A. Clemm">
              <organization/>
            </author>
            <date year="2010" month="May"/>
            <abstract>
              <t>This document describes a mechanism to add origin authentication, message integrity, replay resistance, message sequencing, and detection of missing messages to the transmitted syslog messages. This specification is intended to be used in conjunction with the work defined in RFC 5424, "The Syslog Protocol".  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6991" target="https://www.rfc-editor.org/info/rfc6991">
          <front>
            <title>Common YANG Data Types</title>
            <seriesInfo name="DOI" value="10.17487/RFC6991"/>
            <seriesInfo name="RFC" value="6991"/>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder" role="editor">
              <organization/>
            </author>
            <date year="2013" month="July"/>
            <abstract>
              <t>This document introduces a collection of common data types to be used with the YANG data modeling language.  This document obsoletes RFC 6021.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="I-D.ietf-netmod-rfc7223bis" target="http://www.ietf.org/internet-drafts/draft-ietf-netmod-rfc7223bis-03.txt">
          <front>
            <title>A YANG Data Model for Interface Management</title>
            <seriesInfo name="Internet-Draft" value="draft-ietf-netmod-rfc7223bis-03"/>
            <author initials="M" surname="Bjorklund" fullname="Martin Bjorklund">
              <organization/>
            </author>
            <date month="January" day="11" year="2018"/>
            <abstract>
              <t>This document defines a YANG data model for the management of network interfaces.  It is expected that interface-type-specific data models augment the generic interfaces data model defined in this document. The data model includes definitions for configuration and system state (status information and counters for the collection of statistics).  The YANG model in this document conforms to the Network Management Datastore Architecture defined in I-D.ietf-netmod-revised-datastores.  This document obsoletes RFC 7223.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC7895" target="https://www.rfc-editor.org/info/rfc7895">
          <front>
            <title>YANG Module Library</title>
            <seriesInfo name="DOI" value="10.17487/RFC7895"/>
            <seriesInfo name="RFC" value="7895"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization/>
            </author>
            <date year="2016" month="June"/>
            <abstract>
              <t>This document describes a YANG library that provides information about all the YANG modules used by a network management server (e.g., a Network Configuration Protocol (NETCONF) server).  Simple caching mechanisms are provided to allow clients to minimize retrieval of this information.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC7950" target="https://www.rfc-editor.org/info/rfc7950">
          <front>
            <title>The YANG 1.1 Data Modeling Language</title>
            <seriesInfo name="DOI" value="10.17487/RFC7950"/>
            <seriesInfo name="RFC" value="7950"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization/>
            </author>
            <date year="2016" month="August"/>
            <abstract>
              <t>YANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols.  This document describes the syntax and semantics of version 1.1 of the YANG language.  YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification.  There are a small number of backward incompatibilities from YANG version 1.  This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8089" target="https://www.rfc-editor.org/info/rfc8089">
          <front>
            <title>The "file" URI Scheme</title>
            <seriesInfo name="DOI" value="10.17487/RFC8089"/>
            <seriesInfo name="RFC" value="8089"/>
            <author initials="M." surname="Kerwin" fullname="M. Kerwin">
              <organization/>
            </author>
            <date year="2017" month="February"/>
            <abstract>
              <t>This document provides a more complete specification of the "file" Uniform Resource Identifier (URI) scheme and replaces the very brief definition in Section 3.10 of RFC 1738.</t>
              <t>It defines a common syntax that is intended to interoperate across the broad spectrum of existing usages.  At the same time, it notes some other current practices around the use of file URIs.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <seriesInfo name="DOI" value="10.17487/RFC8174"/>
            <seriesInfo name="RFC" value="8174"/>
            <seriesInfo name="BCP" value="14"/>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="Std-1003.1-2008" target="http://pubs.opengroup.org/onlinepubs/9699919799/">
          <front>
            <title>"Chapter 9: Regular Expressions". The Open Group Base
          Specifications Issue 6, IEEE Std 1003.1-2008, 2016 Edition.</title>
            <author fullname="IEEE and The Open Group">
              <organization>The Open Group</organization>
            </author>
            <date month="September" year="2016"/>
          </front>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="I-D.ietf-netmod-yang-tree-diagrams" target="http://www.ietf.org/internet-drafts/draft-ietf-netmod-yang-tree-diagrams-06.txt">
          <front>
            <title>YANG Tree Diagrams</title>
            <seriesInfo name="Internet-Draft" value="draft-ietf-netmod-yang-tree-diagrams-06"/>
            <author initials="M" surname="Bjorklund" fullname="Martin Bjorklund">
              <organization/>
            </author>
            <author initials="L" surname="Berger" fullname="Lou Berger">
              <organization/>
            </author>
            <date month="February" day="8" year="2018"/>
            <abstract>
              <t>This document captures the current syntax used in YANG module Tree Diagrams.  The purpose of this document is to provide a single location for this definition.  This syntax may be updated from time to time based on the evolution of the YANG language.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="I-D.ietf-netmod-revised-datastores" target="http://www.ietf.org/internet-drafts/draft-ietf-netmod-revised-datastores-10.txt">
          <front>
            <title>Network Management Datastore Architecture</title>
            <seriesInfo name="Internet-Draft" value="draft-ietf-netmod-revised-datastores-10"/>
            <author initials="M" surname="Bjorklund" fullname="Martin Bjorklund">
              <organization/>
            </author>
            <author initials="J" surname="Schoenwaelder" fullname="Juergen Schoenwaelder">
              <organization/>
            </author>
            <author initials="P" surname="Shafer" fullname="Philip Shafer">
              <organization/>
            </author>
            <author initials="K" surname="Watsen" fullname="Kent Watsen">
              <organization/>
            </author>
            <author initials="R" surname="Wilton" fullname="Robert Wilton">
              <organization/>
            </author>
            <date month="January" day="12" year="2018"/>
            <abstract>
              <t>Datastores are a fundamental concept binding the data models written in the YANG data modeling language to network management protocols such as NETCONF and RESTCONF.  This document defines an architectural framework for datastores based on the experience gained with the initial simpler model, addressing requirements that were not well supported in the initial model.  This document updates RFC 7950.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC3688" target="https://www.rfc-editor.org/info/rfc3688">
          <front>
            <title>The IETF XML Registry</title>
            <seriesInfo name="DOI" value="10.17487/RFC3688"/>
            <seriesInfo name="RFC" value="3688"/>
            <seriesInfo name="BCP" value="81"/>
            <author initials="M." surname="Mealling" fullname="M. Mealling">
              <organization/>
            </author>
            <date year="2004" month="January"/>
            <abstract>
              <t>This document describes an IANA maintained registry for IETF standards which use Extensible Markup Language (XML) related items such as Namespaces, Document Type Declarations (DTDs), Schemas, and Resource Description Framework (RDF) Schemas.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6241" target="https://www.rfc-editor.org/info/rfc6241">
          <front>
            <title>Network Configuration Protocol (NETCONF)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6241"/>
            <seriesInfo name="RFC" value="6241"/>
            <author initials="R." surname="Enns" fullname="R. Enns" role="editor">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization/>
            </author>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder" role="editor">
              <organization/>
            </author>
            <author initials="A." surname="Bierman" fullname="A. Bierman" role="editor">
              <organization/>
            </author>
            <date year="2011" month="June"/>
            <abstract>
              <t>The Network Configuration Protocol (NETCONF) defined in this document provides mechanisms to install, manipulate, and delete the configuration of network devices.  It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the protocol messages.  The NETCONF protocol operations are realized as remote procedure calls (RPCs).  This document obsoletes RFC 4741.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6536" target="https://www.rfc-editor.org/info/rfc6536">
          <front>
            <title>Network Configuration Protocol (NETCONF) Access Control Model</title>
            <seriesInfo name="DOI" value="10.17487/RFC6536"/>
            <seriesInfo name="RFC" value="6536"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <date year="2012" month="March"/>
            <abstract>
              <t>The standardization of network configuration interfaces for use with the Network Configuration Protocol (NETCONF) requires a structured and secure operating environment that promotes human usability and multi-vendor interoperability.  There is a need for standard mechanisms to restrict NETCONF protocol access for particular users to a pre-configured subset of all available NETCONF protocol operations and content.  This document defines such an access control model.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8040" target="https://www.rfc-editor.org/info/rfc8040">
          <front>
            <title>RESTCONF Protocol</title>
            <seriesInfo name="DOI" value="10.17487/RFC8040"/>
            <seriesInfo name="RFC" value="8040"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization/>
            </author>
            <date year="2017" month="January"/>
            <abstract>
              <t>This document describes an HTTP-based protocol that provides a programmatic interface for accessing data defined in YANG, using the datastore concepts defined in the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
        </reference>
      </references>
    </references>
    <section numbered="true" toc="default">
      <name>Implementer Guidelines</name>
      <section anchor="extending_facilities" numbered="true" toc="default">
        <name>Extending Facilities</name>
        <t>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.</t>
        <t>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):</t>
        <sourcecode type="yang"><![CDATA[
module example-vendor-syslog-types {
  namespace "http://example.com/ns/vendor-syslog-types";
  prefix vendor-syslogtypes;

  import ietf-syslog {
    prefix syslogtypes;
  }

  organization "Example, Inc.";
  contact
    "Example, Inc.
     Customer Service
     
     E-mail: syslog-yang@example.com";

  description
    "This module contains a collection of vendor-specific YANG type 
     definitions for SYSLOG.";

  revision 2017-08-11 {
    description
      "Version 1.0";
    reference
      "Vendor SYSLOG Types: SYSLOG YANG Model";
  }

  identity vendor_specific_type_1 {
    base syslogtypes:syslog-facility;
    description
      "Adding vendor specific type 1 to syslog-facility";
  }

  identity vendor_specific_type_2 {
    base syslogtypes:syslog-facility;
    description
      "Adding vendor specific type 2 to syslog-facility";
  }
}
         ]]></sourcecode>
      </section>
      <section numbered="true" toc="default">
        <name>Syslog Terminal Output</name>
        <t>Terminal output with requirements more complex than the console
        subtree currently provides, are expected to be supported via vendor
        extensions rather than handled via the file subtree.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Syslog File Naming Convention</name>
        <t>The syslog/file/log-file/file-rotation container contains
        configuration parameters for syslog file rotation. This section
        describes how these fields might be used by an implementer to
        name syslog files in a rotation process. This information 
        is offered as an informative guide only.</t>
        <t>When an active syslog file with a name specified by log-file/name,
        reaches log-file/max-file-size and/or syslog events arrive after the
        period specified by log-file/rollover, the logging system can close the
        file, can compress it, and can name the archive file
        &lt;log-file/name&gt;.0.gz. The logging system can then open a new active
        syslog file &lt;log-file/name&gt;.</t>
        <t>When the new syslog file reaches either of the size limits
        referenced above, &lt;log-file/name&gt;.0.gz can be renamed
        &lt;log-file/name&gt;.1.gz and the new syslog file can be closed,
        compressed and renamed &lt;log-file/name&gt;.0.gz. Each time that a
        new syslog file is closed, each of the prior syslog archive files
        named &lt;log-file/name&gt;.&lt;n&gt;.gz can be renamed to
        &lt;log-file/name&gt;.&lt;n + 1&gt;.gz.</t>
        <t>Removal of archive log files could occur when either or both:</t>
	<ul>
        <li>log-file/number-of-files specified - the logging system can
        create up to log-file/number-of-files syslog archive files after
        which, the contents of the oldest archived file could be overwritten.</li>
        <li>log-file/retention specified - the logging system can remove
        those syslog archive files whose file expiration time (file 
        creation time plus the specified log-file/retention time) is prior  
        to the current time.</li></ul>
      </section>
    </section>
        <section anchor="Acknowledgments" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>The authors wish to thank the following who commented on this
      proposal:</t>
      <t>Andy Bierman, Martin Bjorklund, Alex Campbell, Alex Clemm, Francis
      Dupont, Jim Gibson, Jeffrey Haas, Bob Harold, John Heasley, Giles Heron,
      Lisa Huang, Mahesh Jethanandani, Warren Kumari, Jeffrey K Lange, Jan
      Lindblad, Chris Lonvick, Alexey Melnikov, Kathleen Moriarty, Tom Petch,
      Adam Roach, Juergen Schoenwaelder, Phil Shafer, Yaron Sheffer, Jason
      Sterne, Peter Van Horne, Kent Watsen, Bert Wijnen, Dale R Worley, and
      Aleksandr Zhdankin.</t>
    </section>
    <!-- Change Log

v07 2016-03-20 CW     Converted the document to XML format and incorporated
                      changes from Martin Bjorklund and Tom Petch.

v08 2016-05-07 CW     Incorporated changes from Benoit Claise, Tom Petch,
                      and Mahesh Jethanandani.

v09 2016-07-08 CW     Incorporated changes from Jason Sterne, Tom Petch,
                      and Juergen Schoenwaelder.

v10 2016-10-30 CW     Incorporated changes from Juergen Schoenwaelder.

v11 2016-11-13 CW     Incorporated changes from Phil Shafer.

v12 2017-02-14 CW     Incorporated changes from Andy Bierman and Alex Campbell.

v13 2017-03-13 CW     Incorporated changes from various contributors.

v14 2017-03-27 CW     Incorporated changes from various contributors.  

v15 2017-06-07 CW     Incorporated changes from various contributors.

v16 2017-08-11 CW     Incorporated changes from various contributors.  

v17 2017-09-08 CW     Incorporated changes from various contributors.  

v18 2017-12-08 CW     Incorporated changes from various contributors.

v19 2018-01-12 CW     Incorporated changes from various contributors.

v20 2018-02-09 CW     Incorporated changes from various contributors. 

v21 2018-02-14 CW     Incorporated changes from various contributors. 

v22 2018-02-21 CW     Incorporated changes from Yaron Sheffer and Ron Bonica. 

v23 2018-03-01 CW     Incorporated changes from Kent.

v24 2018-03-08 CW     Incorporated changes from Bob Harold, Kent, Kathleen Moriarty, 
                      Alexey Melnikov, and Warren Kumari.

v25 2018-03-14 CW     Incorporated changes from Adam Roach, Kent, and Alexey Melnikov.

v26 2018-03-15 CW     Incorporated changes from Kent, and Bob Harold.

-->
  </back>
</rfc>
