Network Working Group M. Scott Internet-Draft S. Chisholm Intended status: Standards Track Nortel Expires: September 10, 2009 M. Bjorklund Tail-f Systems March 09, 2009 NETCONF Monitoring Schema draft-ietf-netconf-monitoring-04 Status of this Memo This Internet-Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79. This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. 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." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on September 10, 2009. Copyright Notice Copyright (c) 2009 IETF Trust and the persons identified as the document authors. All rights reserved. Scott, et al. Expires September 10, 2009 [Page 1] Internet-Draft NETCONF Monitoring Schema March 2009 This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents in effect on the date of publication of this document (http://trustee.ietf.org/license-info). Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Scott, et al. Expires September 10, 2009 [Page 2] Internet-Draft NETCONF Monitoring Schema March 2009 Abstract This document defines a NETCONF data model (in XML Schema) to be used to monitor the NETCONF protocol. The monitoring data model includes information about NETCONF datastores, sessions, locks, subscriptions, and statistics. This data facilitates the management of a NETCONF server. This document also defines methods for NETCONF clients to discover data models supported by a NETCONF server and defines a new NETCONF operation to retrieve them. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Definition of Terms . . . . . . . . . . . . . . . . . . . 4 2. XML Schema to Monitor NETCONF . . . . . . . . . . . . . . . . 5 2.1. The /netconf-state Subtree . . . . . . . . . . . . . . . . 5 2.1.1. The /netconf-state/capabilities Subtree . . . . . . . 6 2.1.2. The /netconf-state/datastores Subtree . . . . . . . . 6 2.1.3. The /netconf-state/schemas Subtree . . . . . . . . . . 7 2.1.4. The /netconf-state/sessions Subtree . . . . . . . . . 8 2.1.5. The /netconf-state/subscriptions Subtree . . . . . . . 8 2.1.6. The /netconf-state/statistics Subtree . . . . . . . . 9 3. Schema Specific Operations . . . . . . . . . . . . . . . . . . 12 3.1. The Operation . . . . . . . . . . . . . . . . 12 3.2. NETCONF Schema List Retrieval ( monitoring data) . . 12 4. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.1. Retrieving schema list via . . . . . . . . . . . . . 14 4.2. Retrieving schema instances . . . . . . . . . . . . . . . 16 5. XSD Schema . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.1. NETCONF Monitoring Schema . . . . . . . . . . . . . . . . 18 5.2. inet:host schema . . . . . . . . . . . . . . . . . . . . . 29 6. Security Considerations . . . . . . . . . . . . . . . . . . . 33 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 34 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35 9. Normative References . . . . . . . . . . . . . . . . . . . . . 36 Appendix A. YANG module (non-normative) . . . . . . . . . . . . . 37 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 46 Scott, et al. Expires September 10, 2009 [Page 3] Internet-Draft NETCONF Monitoring Schema March 2009 1. Introduction This document defines NETCONF content via [XMLSchema] to be used to monitor the NETCONF protocol. It provides information about NETCONF sessions and subscriptions. Today, NETCONF capabilities exchange is the only standardized method a client can use to discover the functionality supported by a NETCONF server. This works well for static protocol capabilities but is not well suited for capabilities which could change during a session. Considerations such as different schema formats, feature optionality and access controls can all impact the applicability and level of detail the NETCONF server sends to a client during session setup. Through updated monitoring data NETCONF clients can adjust their capabilities throughout a session. Specifically the details returned can be used by a client to determine whether retrieval of new schema information is required and includes the information required to facilitate the retrieval. The methods defined in this document address the need for further means to query and retrieve schema and netconf state information from a NETCONF server. These are provided to complement existing base NETCONF capabilities and operations and in no way affect existing behaviour. A new operation is also defined to support explicit schema retrieval via NETCONF. 1.1. Definition of Terms 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 d/lockedescribed in [RFC2119]. Schema: A machine readable data model definition. The schema is independent of which data modeling language is used for the data model. Subscription: A concept related to the delivery of notifications (if any to send) involving destination and selection of notifications. It is bound to the lifetime of a session. XML Schema: The W3C XML Schema [XMLSchema] data modeling language. YANG: YANG is a data modeling language used to model configuration and state data manipulated by the NETCONF protocol, NETCONF remote procedure calls, and NETCONF notifications. Scott, et al. Expires September 10, 2009 [Page 4] Internet-Draft NETCONF Monitoring Schema March 2009 2. XML Schema to Monitor NETCONF The following data allows a NETCONF client to monitor both the NETCONF server itself and the associated network device operational data. The specific monitoring data defined in this draft which MUST be present follows. 2.1. The /netconf-state Subtree The /netconf-state subtree is the root of the monitoring data model. It acts as the container for the other monitored data. netconf-state |_capabilities |_datastores |_schemas |_sessions |_subscriptions |_statistics capabilities (type: xs:anyURI) List of NETCONF capabilities supported by the server. datastores (type: ConfigurationDatastore) List of NETCONF datastores on the server. Includes all supported datastore types (running, candidate, startup) schemas (type: SchemaEntry) List of schemas supported on the server. Includes all the information required to identify the schemas and to support their retrieval. sessions (type: ManagementSession) List of all active NETCONF sessions on the device. Includes sessions for all NETCONF clients across all protocols. subscriptions (type: NetconfSubscription) List of all NETCONF notification subscriptions active on the server. statistics (type: ManagementStatistics) Contains management stats for the NETCONF server including performance and error related counters. Scott, et al. Expires September 10, 2009 [Page 5] Internet-Draft NETCONF Monitoring Schema March 2009 2.1.1. The /netconf-state/capabilities Subtree The /netconf-state/capabilibiles subtree contains the capabilities supported by the NETCONF server. The list MUST include all capabilities exchanged during session setup still applicable at the time of the request. This ensures consistency with the initial capabilities exchanged while allowing for potential modifications during a session. 2.1.2. The /netconf-state/datastores Subtree The /netconf-state/datastores subtree contains configuration data for the NETCONF server including information on the lock state of the datastores. configuration (type: ConfigurationDataStore) |_name |_locks name (type: NETCONFDatastoreType) Enumeration of supported datastores; candidate, running, startup. locks (type: ManagementSessionLock) The NETCONF and operations allow a client to lock specific resources in a datastore. The NETCONF server will prevent changes to the locked resources by all sessions except the one which acquired the lock(s). To provide clients the ability to manage locked resources lock information is provided for each ConfigurationDataStore instance. The lock data includes details such as the session which acquired the lock, the type of lock (global or partial) and the list of locked resources. Multiple locks per datastore are supported. Both a global lock and a partial lock MUST contain the sessionId. For partial locks the list of locked nodes is also returned. Since this list may change over time the select expressions originally used to request the lock are also returned. The select expression indicates the original intended scope of the lock and time the lock was acquired. The scope of the partial lock is defined by the list of locked nodes. Scott, et al. Expires September 10, 2009 [Page 6] Internet-Draft NETCONF Monitoring Schema March 2009 2.1.3. The /netconf-state/schemas Subtree The list of supported schema for the NETCONF server. schema |_identifier (key) |_version (key) |_format (key) |_namespace |_location The elements identifier, version, and format are used as a key in the schema list. These are used in the operation. identifier (type: xs:string) Identifier for the schema list entry. For modeling languages which support or require a data model name (eg: YANG module name) the identifier MUST match that name. For modeling lanuguages which do not this must contain some other identifier such as filename. Identifier is used in the operation and may be used for other means such as file retrieval. version (type: xs:string) Version of the schema supported. Multiple versions MAY be supported simultaneously by a NETCONF server. Each version MUST be reported individually in the schema list, i.e. with same identifier, possibly different location, but different version. format (type: SchemaFormat) The data modeling language of the file/module. Current selection of XSD, YANG, and RNG. namespace(type: xs:anyURI) The XML namespace defined by the data model. location (union type: xs:string, xs:anyURI) One of more locations from which this specific schema, format, and version can be retrieved. The list SHOULD contain at least one entry per schema. A schema entry may be located on a network device (eg: xs:anyURI), (eg: xs:string reference to file system for ftp retrieval) or available explicitly via NETCONF (xs:string value 'NETCONF') for NETCONF servers which support the schema-retrieval capability via . Scott, et al. Expires September 10, 2009 [Page 7] Internet-Draft NETCONF Monitoring Schema March 2009 2.1.4. The /netconf-state/sessions Subtree Session data pertaining to the NETCONF server. Includes data for NETCONF and non-NETCONF management sessions. sessions (type: ManagementSessionInfo): session |_sessionId (key) |_transport |_protocol |_username |_sourceHost |_loginTime sessionId (type: SessionId) Unique identifier for the session. transport (type: TransportType) Idenfities transport for each session, e.g. "Console", "SSH". protocol (type: ProtocolType) Identifies the protocol being used for each session, e.g.: "NETCONF", "CLI", "WebUI". username (type: xs:string) Subject to the authentication mechanisms and security considerations this SHOULD contain an identifier which can be used to uniquely identify an individual client (human or machine). This is likely be implementation specific subject to the security requirements of the device vendor and/or operators. e.g. an SSH user, a host RSA fingerprint or other identifier deemed acceptable sourceHost (type: inet:host) Host identifier (IP + name) for the client. See section 5.2 for definition. loginTime (type: xs:dateTime) Time at which the session was established. 2.1.5. The /netconf-state/subscriptions Subtree Scott, et al. Expires September 10, 2009 [Page 8] Internet-Draft NETCONF Monitoring Schema March 2009 subscriptions: NetconfSubscription complex type. List of notifications subscriptions for all active sessions. subscription |_sessionId |_stream |_filter |_startTime |_stopTime |_outNotifications sessionId (type: SessionId) A unique identifier for a session carrying notifications. The value of sessionId MUST be the same as the value of the corresponding /netconf-state/sessions/sessionId to allow correlation. stream (netconf notification type: streamNameType) Specific event notifications subscribed by session. Unique identifier mappable to event subscriptions. filter ( netconf notification type: FilterType) Filter being applied to the notification stream. startTime (xs:dateTime) Optional startTime parameter given in the request. stopTime (xs:dateTime) Optional stopTime parameter given in the request. outNotifications (xs:unsignedInt) Total messages sent for this subscription. 2.1.6. The /netconf-state/statistics Subtree Statistical data pertaining to the NETCONF server. statistics |_managementStatistics |_netconfStartTime |_inSessions |_inXMLParseErrors |_inBadHellos |_inRpcs |_inBadRpcs Scott, et al. Expires September 10, 2009 [Page 9] Internet-Draft NETCONF Monitoring Schema March 2009 |_inNotSupportedRpcs |_outRpcReplies |_outRpcErrors |_outNotifications managementStatistics(type: ManagementPerformanceStatistics): Contains management session related performance data for the NETCONF server. netconfStartTime (type: xs:dateTime) Date and time at which the NETCONF server process was started. Allows for calculation of simple time interval for reported metrics. Ie: current time - startTime defines the collection interval for the metrics allowing for calculations such as averages. More complex calculations would require multiple collection intervals with both start and stop times defined per interval. inSessions (type: xs: unsignedInt) The total number of NETCONF sessions started towards the NETCONF peer. inXMLParseErrors (type: xs:unsignedInt) The total number of messages that were unparsable and thus ignored. This covers both unparsable and messages. inBadHellos (type: xs:unsignedInt) The total number of sessions silently dropped because an invalid message was received. This includes messages with a "session-id" attribute, bad namespace, and bad capability declarations. inRpcs (type: xs:unsignedInt) The total number of rpc requests received. inBadRpcs (type: xs:unsignedInt) The total number of rpcs which were parsed correctly, but couldn't be serviced because they contained non-conformant XML, e.g. missing a mandatory parameter. inNotSupportedRpcs (type: xs:unsignedInt) The total number of rpcs which were parsed correctly, but couldn't be serviced because they were not supported by the agent. outRpcReplies (type: xs:unsignedInt) The total number of messages sent. outRpcErrors (type: xs:unsignedInt) The total number of messages with sent. Scott, et al. Expires September 10, 2009 [Page 10] Internet-Draft NETCONF Monitoring Schema March 2009 outNotifications (type: xs:unsignedInt) The total number of messages sent for all sessions. Scott, et al. Expires September 10, 2009 [Page 11] Internet-Draft NETCONF Monitoring Schema March 2009 3. Schema Specific Operations 3.1. The Operation Description: When the schema is available on the device and the client wishes to have it returned via NETCONF this new operation is used. Parameters: identifier (type: xs:string): Identifier for the schema list entry. version (type: xs:string): Version of the schema supported. format (type: SchemaFormat): The data modeling language of the schema. Example: Retrieve a specific schema from the device using operation foo v1 XSD > Positive Response: The NETCONF server returns the XML schema (XSD). < > 3.2. NETCONF Schema List Retrieval ( monitoring data) A NETCONF client retrieves the list of supported schema from a NETCONF server by retrieving the /netconf-state/schema subtree via a >get< operation. Available schema for the requesting session are returned in the reply containing the ,, and elements. Since the same schema may be supported in multiple locations and/or have multiple versions and/or Scott, et al. Expires September 10, 2009 [Page 12] Internet-Draft NETCONF Monitoring Schema March 2009 multiple formats no particular attribute is unique. An empty reply is returned if there are no available schema. The response data can be used to determine the available schema and their versions. The schema itself (i.e. schema content) is not returned in the response. The URL details returned in the list SHOULD facilitate retrieval from a network location via a means such as ftp or http. Negative Response: If the requested schema is not available the response will be generated as follows: If no schema matches the requested parameters the will be 'operation-failed', and the will be 'no-matches'. If access control denies the partial lock, the will be 'access-denied'. Additionally the ability to retrieve a schema via NETCONF SHOULD be supported. When a schema is available on the device and the schema-retrieval capability is supported by the NETCONF server a location value of 'NETCONF' MUST be used to indicate that it can be retrieved via NETCONF using the operation described in section 3.1. Scott, et al. Expires September 10, 2009 [Page 13] Internet-Draft NETCONF Monitoring Schema March 2009 4. Examples 4.1. Retrieving schema list via The NETCONF server returns a list of data models available for retrieval. Scott, et al. Expires September 10, 2009 [Page 14] Internet-Draft NETCONF Monitoring Schema March 2009 foo 1.0 XSD http://example.com/foo ftp://ftp.example.com/schemas/foo_1.0.xsd http://www.example.com/schema/foo_1.0.xsd NETCONF foo 1.1 XSD http://example.com/foo ftp://ftp.example.com/schemas/foo_1.1.xsd http://www.example.com/schema/foo_1.1.xsd NETCONF bar 2008-06-01 YANG http://example.com/bar http://example.com/schema/bar-2008-06-01.yang NETCONF bar-types 2008-06-01 YANG http://example.com/bar http://example.com/schema/bar-types-2008-06-01.yang NETCONF Scott, et al. Expires September 10, 2009 [Page 15] Internet-Draft NETCONF Monitoring Schema March 2009 4.2. Retrieving schema instances Given the reply in the previous section, the following examples illustrate the availability of 'foo', 'bar', and 'bar-types' schema at multiple locations, with multiple formats, and in multiple locations. 1. foo, version 1.0 in XSD format: a. Via FTP using location ftp://ftp.example.com/schemas/foo_1.0.xsd b. Via HTTP using location http://www.example.com/schema/foo/1.0.xsd c. Via using identifier, version, and format parameters. foo 1.0 XSD 2. bar, version 2008-06-01 in YANG format: a. Via HTTP using location http://example.com/schema/bar-2008-06-01.yang b. Via using identifer, version, and format parameters: bar 2008-06-01 YANG 3. bar-types, version 2008-06-01 in YANG format: Scott, et al. Expires September 10, 2009 [Page 16] Internet-Draft NETCONF Monitoring Schema March 2009 a. Via using identifer, version, and format parameters: bar-types 2008-06-01 YANG Scott, et al. Expires September 10, 2009 [Page 17] Internet-Draft NETCONF Monitoring Schema March 2009 5. XSD Schema 5.1. NETCONF Monitoring Schema The data model described in this memo is defined in the following XSD. The list of currently provided NETCONF capabilities. This may be different than those exchanged during session setup (i.e. hello). Scott, et al. Expires September 10, 2009 [Page 18] Internet-Draft NETCONF Monitoring Schema March 2009 Contains the NETCONF configurations datastores available on the device. Contains the list of supported schemas on the device. I.e. NETCONF data models, interface descriptions, etc. Contains the details on active sessions on the device. Covers both NETCONF and non-NETCONF management sessions. Contains the details on active event stream Scott, et al. Expires September 10, 2009 [Page 19] Internet-Draft NETCONF Monitoring Schema March 2009 subscriptions. Includes active replay streams, if supported. Contains NETCONF subscription information per RFC 5277 - NETCONF Event Notifications. Contains management metrics for the NETCONF server. Contains information on the datastores available on the NETCONF server including locks. enumeration of supported datastores; candidate, running, startup Scott, et al. Expires September 10, 2009 [Page 20] Internet-Draft NETCONF Monitoring Schema March 2009 An indication of whether a resource is locked or unlocked. If locked, additional information about the locking such as user an time stamp is provided. Present if a global lock is set. Present if at least one partial lock is set. Contains the information used to describe the schema. Identifier to uniquely reference the schema. Version of the schema supported. Multiple versions can be Scott, et al. Expires September 10, 2009 [Page 21] Internet-Draft NETCONF Monitoring Schema March 2009 supported simultaneously. Schema language for the file/module. Eg: XSD, YANG, RNG. The XML namespace defined by the data model. A location from which the schema can be retrieved. Can be either on the network device retrievable explicitly via the get-schema netconf operation (denoted by the value 'NETCONF') or some network location (i.e. URL). Contains information related to managment sessions on Scott, et al. Expires September 10, 2009 [Page 22] Internet-Draft NETCONF Monitoring Schema March 2009 the device. Unique identifier for the session instance. Identifies the transport for each session, e.g. "Console", "SSH". Identifies the protocol being used for each session, e.g. "NETCONF", "CLI", "WebUI". Session owner. Client for the session. Scott, et al. Expires September 10, 2009 [Page 23] Internet-Draft NETCONF Monitoring Schema March 2009 Time at which the session was established. Contains information on the active subscriptions on the NETCONF server. Subscriptions which have ended are not reported. Contains management statistics for the NETCONF server. Date and time at which the NETCONF server process was started. Allows for calculation of time interval for reported metrics. The total number of NETCONF sessions started towards the NETCONF peer. inSessions - inBadHellos = 'number of correctly started Scott, et al. Expires September 10, 2009 [Page 24] Internet-Draft NETCONF Monitoring Schema March 2009 netconf sessions' The total number of messages that were unparsable and thus ignored. This covers both unparsable 'hello' and 'rpc' messages. The total number of sessions silently dropped because an invalid 'hello' message was received. This includes hello messages with a 'session-id' attribute, bad namespace, and bad capability declarations. The total number of rpc requests received. The total number of rpcs which were parsed correctly, but couldn't be serviced because they contained non-conformant XML, e.g. missing a mandatory parameter. The total number of rpcs which were parsed correctly, but couldn't be serviced because they were not supported by the agent. Scott, et al. Expires September 10, 2009 [Page 25] Internet-Draft NETCONF Monitoring Schema March 2009 The total number of 'rpc-reply' messages sent. The total number of 'rpc-reply' messages with 'rpc-error' sent. The total number of 'notification' messages sent. Enumeration of possible NETCONF datastore types. The session Id which holds the lock. Scott, et al. Expires September 10, 2009 [Page 26] Internet-Draft NETCONF Monitoring Schema March 2009 Date and Time the lock was acquired. For a partial lock this is the lock id returned in the partial-lock response. The session Id which holds the lock. Date and Time the lock was acquired. The xpath expression which was used to request the lock. Scott, et al. Expires September 10, 2009 [Page 27] Internet-Draft NETCONF Monitoring Schema March 2009 The list of instance-identifiers (i.e. the locked nodes). Format of the schema. Transport choices. 1G Protocol choices. Scott, et al. Expires September 10, 2009 [Page 28] Internet-Draft NETCONF Monitoring Schema March 2009 RPC definition: <get-schema> 5.2. inet:host schema The complex type ManagementSession contains element sourceHost of type inet:host. The following schema defines the referenced type. The ipAddress type represents an IP address and is IP version neutral. The format of the textual representations implies the IP version. Scott, et al. Expires September 10, 2009 [Page 29] Internet-Draft NETCONF Monitoring Schema March 2009 The ipv4Address type represents an IPv4 address in dotted-quad notation. The IPv4 address may include a zone index, separated by a % sign. The ipv6Address type represents an IPv6 address in full, mixed, shortened and shortened mixed notation. The IPv6 address may include a zone index, separated by a % sign. The domainName type represents a DNS domain name. The name SHOULD be fully qualified whenever possible. The description clause of objects using the domainName type MUST describe how (and when) these names are resolved to IP addresses. Note that the resolution of a domainName value may require to query multiple DNS records (e.g., A for IPv4 and AAAA for IPv6). The order of the resolution process and which DNS record takes precedence depends on the configuration of the resolver. The host type represents either an IP address or a DNS domain name. Scott, et al. Expires September 10, 2009 [Page 31] Internet-Draft NETCONF Monitoring Schema March 2009 Scott, et al. Expires September 10, 2009 [Page 32] Internet-Draft NETCONF Monitoring Schema March 2009 6. Security Considerations The NETCONF monitoring schema as defined in this document provides information about a NETCONF system that could be used to aid an attack on that system. The same considerations as for the base NETCONF Protocol [RFC4741] are valid. It is assumed that access to the data and operations defined in this document are subject to appropriate access control on the device. Scott, et al. Expires September 10, 2009 [Page 33] Internet-Draft NETCONF Monitoring Schema March 2009 7. Acknowledgements The authors would like to thank Andy Bierman, Mehmet Ersue, Washam Fan, David Harrington, Balazs Lengyel, Hideki Okita, Juergen Schoenwaelder, Bert Wijnen and many other members of the NETCONF WG for providing important input to this document. Scott, et al. Expires September 10, 2009 [Page 34] Internet-Draft NETCONF Monitoring Schema March 2009 8. IANA Considerations -- Editor note to IANA/RFC-Editor: we request that you make these assignments, in which case it is to be documented as below. This document will require new URIs for the NETCONF XML namespace in the IETF XML registry [RFC 3688: The IETF XML Resgistry]. Following the format in RFC 3688, the following registrations require consideration. +----------------------+----------------------------------------------+ | Index | Capability Identifier | +----------------------+----------------------------------------------+ | :netconf-monitoring | urn:ietf:params:netconf:capability: | | | netconf-monitoring:1.0 | | | | | :schema-retrieval | urn:ietf:params:netconf:capability: | | | schema-retrieval:1.0 | +----------------------+----------------------------------------------+ Note, the proposed capability URNs are also compliant to section 10.3 of NETCONF [RFC 4741: NETCONF Configuration Protocol ]. Scott, et al. Expires September 10, 2009 [Page 35] Internet-Draft NETCONF Monitoring Schema March 2009 9. Normative References [NETCONF] Enns, R., "NETCONF Configuration Protocol", RFC 4741, February 2006. [NETCONF-EVENT] Chisholm, S. and H. Trevino, "NETCONF Event Notifications", ID draft-ietf-netconf-notification-14, June 2008. [RFC2119] Bradner, s., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3688] Bradner, s., "The IETF XML Registry", BCP 81, RFC 3688, January 2004. [XML] World Wide Web Consortium, "Extensible Markup Language (XML) 1.0", W3C XML, February 1998, . [XMLSchema] Fallside, D. and P. Walmsley, "XML Schema Part 0: Primer Second Edition", W3C XML Schema, October 2004. [draft-ietf-netconf-partial-lock-07] Lengyel, Balazs., "Partial Lock RPC for NETCONF", February 2009. Scott, et al. Expires September 10, 2009 [Page 36] Internet-Draft NETCONF Monitoring Schema March 2009 Appendix A. YANG module (non-normative) The following YANG module is included as a reference only. It is based on YANG specification at the time of publishing and is subject to change as a result of NETMOD work underway to refine YANG. module ietf-netconf-state { namespace "urn:ietf:params:xml:ns:netconf:state"; prefix "ns"; import ietf-yang-types { prefix yang; } import ietf-inet-types { prefix inet; } organization "IETF NETCONF (Network Configuration) Working Group"; contact "WG Web: WG List: WG Chair: Mehmet Ersue WG Chair: Bert Wijnen Editor: Mark Scott "; description "NETCONF Monitoring Module. All elements in this module are read-only. Copyright (c) 2009 IETF Trust and the persons identified as the document authors. All rights reserved. This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; // RFC Ed.: replace XXXX with actual RFC number and remove this note revision 2009-03-03 { description "Initial revision, published as RFC XXXX."; // RFC Ed.: replace XXXX with actual RFC number // and remove this note } Scott, et al. Expires September 10, 2009 [Page 37] Internet-Draft NETCONF Monitoring Schema March 2009 typedef SessionId { type uint32 { "WG Web: WG List: WG Chair: David Partain WG Chair: David Harrington Editor: Juergen Schoenwaelder "; range "1..max"; } reference "RFC 4741: NETCONF Configuration Protocol"; } grouping NETCONFDatastoreType { description "Enumeration of possible NETCONF datastore types."; reference "RFC 4741: NETCONF Configuration Protocol"; choice datastore { mandatory true; leaf running { type empty; } leaf candidate { type empty; } leaf startup { type empty; } } } typedef TransportType { type enumeration { enum "SSH"; enum "TLS"; enum "Console"; enum "HTTP"; enum "HTTPS"; enum "BEEP"; enum "SOAP"; } } Scott, et al. Expires September 10, 2009 [Page 38] Internet-Draft NETCONF Monitoring Schema March 2009 typedef ProtocolType { type enumeration { enum "CLI"; enum "NETCONF"; enum "WebUI"; } } typedef SchemaFormat { type enumeration { enum "XSD" { reference "W3C REC REC-xmlschema-1-20041028"; } enum "YANG" { reference "draft-ietf-netmod-yang"; } enum "RNG" { reference "ISO/IEC 19757-2"; } } } container netconf { config false; container capabilities { description "The list of currently provided NETCONF capabilities. This may be different than those exchanged during session setup (i.e. hello)."; leaf-list capability { type inet:uri; } } container datastores { description "List of NETCONF configuration datastores (e.g. running, startup, candidate) supported on this device and related information."; list datastore { container name { uses NETCONFDatastoreType; } container locks { description "An indication of whether a resource is locked or unlocked. If locked, additional information about Scott, et al. Expires September 10, 2009 [Page 39] Internet-Draft NETCONF Monitoring Schema March 2009 the locking such as user an time stamp is provided."; grouping LockInfo { leaf lockedBySession { type SessionId; description "The session ID of the session that has locked this resource."; } leaf lockedTime { type yang:date-and-time; description "The date and time of when the resource was locked."; } } choice lockType { container globalLock { description "Present if the global lock is set."; uses LockInfo; } list partialLocks { key lockId; description "For a partial lock this is the lock id returned in the response."; leaf lockId { type uint32; } uses LockInfo; leaf-list select { type string; min-elements 1; description "The xpath expression which was used to request the lock."; } leaf-list lockedNodes { type instance-identifier; description "The list of instance-identifiers (i.e. the locked nodes)."; } } } Scott, et al. Expires September 10, 2009 [Page 40] Internet-Draft NETCONF Monitoring Schema March 2009 } } } container schemas { list schema { key "identifier version format"; leaf identifier { type string; description "Identifier to uniquely reference the schema"; } leaf version { type string; description "Version of the schema supported. Multiple versions can be supported simultaneously."; } leaf format { type SchemaFormat; description "Schema language for the file/module."; } leaf namespace { type inet:uri; description "The XML namespace defined by the data model."; } leaf location { type union { type enumeration { enum "NETCONF"; } type inet:uri; } description "One or more Locations from which the schema can be retrieved. Can be either on the network device retrievable explicitly via the get-schema netconf operation (denoted by the value 'NETCONF') or some network location (i.e. URL)."; } } } container sessions { description "List of NETCONF sessions currently active on this device."; Scott, et al. Expires September 10, 2009 [Page 41] Internet-Draft NETCONF Monitoring Schema March 2009 list session { key sessionId; leaf sessionId { type SessionId; } leaf transport { type TransportType; } leaf protocol { type ProtocolType; } leaf username { type string; } leaf sourceHost { type inet:host; } leaf loginTime { type yang:date-and-time; description "Time at which the session was established."; } } } container subscriptions { description "Contains information on the active subscriptions on the NETCONF server. Subscriptions which have ended are not reported."; list subscription { key sessionId; description "Information about Netconf Notification Subscriptions."; leaf sessionId { type SessionId; description "The session id associated with this subscription."; } leaf stream { type string; description "The stream associated with this subscription."; } anyxml filter { description "The filters associated with this subscription."; reference "RFC 4741: NETCONF Configuration Protocol"; Scott, et al. Expires September 10, 2009 [Page 42] Internet-Draft NETCONF Monitoring Schema March 2009 } leaf startTime { type yang:date-and-time; description "The startTime parameter from the create-subscription invokation, if it was present."; } leaf stopTime { type yang:date-and-time; description "The stopTime parameter from the create-subscription invokation, if it was present."; } leaf outNotifications { type yang:zero-based-counter32; description "A count of event notifications sent along this connection since the subscription was created."; } } } container statistics { leaf netconfStartTime { type yang:date-and-time; description "Date and time at which the NETCONF server process was started. Allows for calculation of time interval for reported metrics."; } leaf inSessions { type yang:zero-based-counter32; description "The total number of NETCONF sessions started towards the NETCONF peer. inSessions - inBadHellos = 'number of correctly started netconf sessions'"; } leaf inXMLParseErrors { type yang:zero-based-counter32; description "The total number of messages that were unparsable and thus ignored. This covers both unparsable 'hello' and 'rpc' messages."; } leaf inBadHellos { Scott, et al. Expires September 10, 2009 [Page 43] Internet-Draft NETCONF Monitoring Schema March 2009 type yang:zero-based-counter32; description "The total number of sessions silently dropped because an invalid 'hello' message was received. This includes hello messages with a 'session-id' attribute, bad namespace, and bad capability declarations."; } leaf inRpcs { type yang:zero-based-counter32; description "The total number of rpc requests received."; } leaf inBadRpcs { type yang:zero-based-counter32; description "The total number of rpcs which were parsed correctly, but couldn't be serviced because they contained non-conformant XML, e.g. missing a mandatory parameter."; } leaf inNotSupportedRpcs { type yang:zero-based-counter32; description "The total number of rpcs which were parsed correctly, but couldn't be serviced because they were not supported by the agent."; } leaf outRpcReplies { type yang:zero-based-counter32; description "The total number of 'rpc-reply' messages sent."; } leaf outRpcErrors { type yang:zero-based-counter32; description "The total number of 'rpc-reply' messages with 'rpc-error' sent."; } leaf outNotifications { type yang:zero-based-counter32; description "The total number of 'notifications' messages sent."; } } } rpc get-schema { input { Scott, et al. Expires September 10, 2009 [Page 44] Internet-Draft NETCONF Monitoring Schema March 2009 leaf identifier { type string; mandatory true; } leaf version { type string; mandatory true; } leaf format { type SchemaFormat; mandatory true; } } output { anyxml data { description "Contains the schema content."; } } } } Scott, et al. Expires September 10, 2009 [Page 45] Internet-Draft NETCONF Monitoring Schema March 2009 Authors' Addresses Mark Scott Nortel 3500 Carling Ave Nepean, Ontario K2H 8E9 Canada Email: markscot@nortel.com Sharon Chisholm Nortel 3500 Carling Ave Nepean, Ontario K2H 8E9 Canada Email: schishol@nortel.com Martin Bjorklund Tail-f Systems Klara Norra Kyrkogata 31 SE-111 22 Stockholm, Sweden Email: mbj@tail-f.com Scott, et al. Expires September 10, 2009 [Page 46]