openconfig-system-logging

This module defines configuration and operational state data for common logging facilities on network systems.

  • Version: 2017-09-18

    openconfig-system-logging@2017-09-18


    
      module openconfig-system-logging {
    
        yang-version 1;
    
        namespace
          "http://openconfig.net/yang/system/logging";
    
        prefix oc-log;
    
        import openconfig-extensions {
          prefix oc-ext;
        }
        import openconfig-inet-types {
          prefix oc-inet;
        }
    
        organization "OpenConfig working group";
    
        contact
          "OpenConfig working group
    www.openconfig.net";
    
        description
          "This module defines configuration and operational state data
    for common logging facilities on network systems.";
    
        revision "2017-09-18" {
          description
            "Updated to use OpenConfig types modules";
          reference
            "0.3.0";
    
        }
    
        revision "2017-07-06" {
          description
            "Move to oc-inet types, add IETF attribution, add RADIUS
    counters, changed password leaf names to indicate hashed";
          reference
            "0.2.0";
    
        }
    
        revision "2017-01-29" {
          description "Initial public release";
          reference
            "0.1.0";
    
        }
    
        oc-ext:openconfig-version "0.3.0";
    
        identity SYSLOG_FACILITY {
          description
            "Base identity for Syslog message facilities.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity ALL {
          base SYSLOG_FACILITY;
          description "All supported facilities";
        }
    
        identity KERNEL {
          base SYSLOG_FACILITY;
          description
            "The facility for kernel messages";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity USER {
          base SYSLOG_FACILITY;
          description
            "The facility for user-level messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity MAIL {
          base SYSLOG_FACILITY;
          description
            "The facility for the mail system.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity SYSTEM_DAEMON {
          base SYSLOG_FACILITY;
          description
            "The facility for the system daemons.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity AUTH {
          base SYSLOG_FACILITY;
          description
            "The facility for security/authorization messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity SYSLOG {
          base SYSLOG_FACILITY;
          description
            "The facility for messages generated internally by syslogd
    facility.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity AUTHPRIV {
          base SYSLOG_FACILITY;
          description
            "The facility for privileged security/authorization messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity NTP {
          base SYSLOG_FACILITY;
          description
            "The facility for the NTP subsystem.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity AUDIT {
          base SYSLOG_FACILITY;
          description
            "The facility for log audit messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity CONSOLE {
          base SYSLOG_FACILITY;
          description
            "The facility for log alert messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity LOCAL0 {
          base SYSLOG_FACILITY;
          description
            "The facility for local use 0 messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity LOCAL1 {
          base SYSLOG_FACILITY;
          description
            "The facility for local use 1 messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity LOCAL2 {
          base SYSLOG_FACILITY;
          description
            "The facility for local use 2 messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity LOCAL3 {
          base SYSLOG_FACILITY;
          description
            "The facility for local use 3 messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity LOCAL4 {
          base SYSLOG_FACILITY;
          description
            "The facility for local use 4 messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity LOCAL5 {
          base SYSLOG_FACILITY;
          description
            "The facility for local use 5 messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity LOCAL6 {
          base SYSLOG_FACILITY;
          description
            "The facility for local use 6 messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity LOCAL7 {
          base SYSLOG_FACILITY;
          description
            "The facility for local use 7 messages.";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        identity LOG_DESTINATION_TYPE {
          description
            "Base identity for destination for logging messages";
        }
    
        identity DEST_CONSOLE {
          base LOG_DESTINATION_TYPE;
          description
            "Directs log messages to the console";
        }
    
        identity DEST_BUFFER {
          base LOG_DESTINATION_TYPE;
          description
            "Directs log messages to and in-memory circular buffer";
        }
    
        identity DEST_FILE {
          base LOG_DESTINATION_TYPE;
          description
            "Directs log messages to a local file";
        }
    
        identity DEST_REMOTE {
          base LOG_DESTINATION_TYPE;
          description
            "Directs log messages to a remote syslog server";
        }
    
        typedef syslog-severity {
          type enumeration {
            enum "EMERGENCY" {
              value 0;
              description
                "Emergency: system is unusable (0)";
            }
            enum "ALERT" {
              value 1;
              description
                "Alert: action must be taken immediately (1)";
            }
            enum "CRITICAL" {
              value 2;
              description
                "Critical: critical conditions (2)";
            }
            enum "ERROR" {
              value 3;
              description
                "Error: error conditions (3)";
            }
            enum "WARNING" {
              value 4;
              description
                "Warning: warning conditions (4)";
            }
            enum "NOTICE" {
              value 5;
              description
                "Notice: normal but significant  condition(5)";
            }
            enum "INFORMATIONAL" {
              value 6;
              description
                "Informational: informational messages (6)";
            }
            enum "DEBUG" {
              value 7;
              description
                "Debug: debug-level messages (7)";
            }
          }
          description
            "Syslog message severities";
          reference
            "IETF RFC 5424 - The Syslog Protocol";
    
        }
    
        grouping logging-selectors-config {
          description
            "Configuration data for logging selectors";
          leaf facility {
            type identityref {
              base SYSLOG_FACILITY;
            }
            description
              "Specifies the facility, or class of messages to log";
          }
    
          leaf severity {
            type syslog-severity;
            description
              "Specifies that only messages of the given severity (or
    greater severity) for the corresonding facility are logged";
          }
        }  // grouping logging-selectors-config
    
        grouping logging-selectors-state {
          description
            "Operational state data for logging selectors";
        }  // grouping logging-selectors-state
    
        grouping logging-selectors-top {
          description
            "Top-level grouping for the logging selector list";
          container selectors {
            description "Enclosing container ";
            list selector {
              key "facility severity";
              description
                "List of selectors for log messages";
              leaf facility {
                type leafref {
                  path "../config/facility";
                }
                description
                  "Reference to facility list key";
              }
    
              leaf severity {
                type leafref {
                  path "../config/severity";
                }
                description
                  "Reference to severity list key";
              }
    
              container config {
                description
                  "Configuration data ";
                uses logging-selectors-config;
              }  // container config
    
              container state {
                config false;
                description
                  "Operational state data ";
                uses logging-selectors-config;
    
                uses logging-selectors-state;
              }  // container state
            }  // list selector
          }  // container selectors
        }  // grouping logging-selectors-top
    
        grouping logging-console-config {
          description
            "Configuration data for console logging";
        }  // grouping logging-console-config
    
        grouping logging-console-state {
          description
            "Operational state data for console logging";
        }  // grouping logging-console-state
    
        grouping logging-console-top {
          description
            "Top-level grouping for console logging data";
          container console {
            description
              "Top-level container for data related to console-based
    logging";
            container config {
              description
                "Configuration data for console logging";
              uses logging-console-config;
            }  // container config
    
            container state {
              config false;
              description
                "Operational state data for console logging";
              uses logging-console-config;
    
              uses logging-console-state;
            }  // container state
    
            uses logging-selectors-top;
          }  // container console
        }  // grouping logging-console-top
    
        grouping logging-remote-config {
          description
            "Configuration data for remote log servers";
          leaf host {
            type oc-inet:host;
            description
              "IP address or hostname of the remote log server";
          }
    
          leaf source-address {
            type oc-inet:ip-address;
            description
              "Source IP address for packets to the log server";
          }
    
          leaf remote-port {
            type oc-inet:port-number;
            default "514";
            description
              "Sets the destination port number for syslog UDP messages to
    the server.  The default for syslog is 514.";
          }
        }  // grouping logging-remote-config
    
        grouping logging-remote-state {
          description
            "Operational state data for remote log servers";
        }  // grouping logging-remote-state
    
        grouping logging-remote-top {
          description
            "Top-level grouping for remote log servers";
          container remote-servers {
            description
              "Enclosing container for the list of remote log servers";
            list remote-server {
              key "host";
              description
                "List of remote log servers";
              leaf host {
                type leafref {
                  path "../config/host";
                }
                description
                  "Reference to the host list key";
              }
    
              container config {
                description
                  "Configuration data for remote log servers";
                uses logging-remote-config;
              }  // container config
    
              container state {
                config false;
                description
                  "Operational state data for remote log servers";
                uses logging-remote-config;
    
                uses logging-remote-state;
              }  // container state
    
              uses logging-selectors-top;
            }  // list remote-server
          }  // container remote-servers
        }  // grouping logging-remote-top
    
        grouping logging-top {
          description
            "Top-level grouping for logging data";
          container logging {
            description
              "Top-level container for data related to logging / syslog";
            uses logging-console-top;
    
            uses logging-remote-top;
          }  // container logging
        }  // grouping logging-top
      }  // module openconfig-system-logging
    

© 2023 YumaWorks, Inc. All rights reserved.