YANG Module for NETCONF Monitoring
Extracted elements (28)
Schema retrieval is separated into two steps: the <get> operation retrieves the schema list metadata (identifier, version, format, location) without schema content, while the <get-schema> operation or external URIs (FTP, HTTP) are used to retrieve the actual schema content. This avoids embedding potentially large schemas in ordinary get responses.
The locks container uses 'presence' semantics — it only exists when the datastore is actually locked — rather than using an empty list or boolean flag, which cleanly models the absence-of-lock state and avoids requiring clients to parse empty lock structures.
Schema version for YANG data models is defined as the value of the most recent YANG 'revision' statement in the module or submodule, or the empty string if no 'revision' statement is present, ensuring consistent versioning across implementations.
The dropped-sessions counter is NOT incremented for sessions closed by <close-session> or killed by <kill-session>; it only counts abnormally terminated sessions (idle timeout, transport close), which implementers must distinguish carefully.
A server implementing the ietf-netconf-monitoring data model MUST advertise the capability URI 'urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring' as described in RFC 6020.
Both a global lock and a partial lock entry in the locks container MUST contain the NETCONF session-id of the locking session; if the lock is held by a non-NETCONF-managed session (e.g., CLI), a session-id of 0 is reported.
For modeling languages that support or require a data model name (e.g., YANG module name), the schema identifier MUST match that name.
For YANG data models in the schema list, 'yang' format MUST be supported and 'yin' format MAY also be provided.
If the requested schema does not exist, <get-schema> MUST return error-tag 'invalid-value'. If more than one schema matches the parameters, error-tag is 'operation-failed' with error-app-tag 'data-not-unique'.
Multiple schema versions MAY be supported simultaneously by a NETCONF server, but each version MUST be reported individually in the schema list with the same identifier but different version.
The /netconf-state/capabilities list MUST include all capabilities exchanged during session setup that are still applicable at the time of the request.
The schema location list SHOULD contain at least one entry per schema.
The session list MUST include all currently active NETCONF sessions on the device.
The common-counters grouping defines four zero-based-counter32 leaves (in-rpcs, in-bad-rpcs, out-rpc-errors, out-notifications) reused in both per-session and global statistics contexts.
The <get-schema> RPC operation retrieves a schema by mandatory identifier (string), optional version (string), and optional format (identityref, default 'yang'). Returns the schema content as anyxml data.
The ietf-netconf-monitoring YANG module defines the netconf-state container as the root of the monitoring data model, containing capabilities, datastores, schemas, sessions, and statistics subtrees. All elements are read-only (config false).
The netconf-datastore-type typedef is an enumeration of running, candidate, and startup, used to name datastores in the /netconf-state/datastores list.
The /netconf-state/datastores subtree contains a list of NETCONF configuration datastores (running, candidate, startup) and their lock state, including both global and partial lock information per RFC 5717.
The /netconf-state/schemas subtree lists all supported schemas keyed by (identifier, version, format), with namespace and location fields. Location can be a URI or the special value 'NETCONF' indicating retrieval via <get-schema>.
The /netconf-state/sessions subtree provides per-session data including session-id (uint32 1..max), transport identity, username, source-host, login-time, and zero-based counters for in-rpcs, in-bad-rpcs, out-rpc-errors, and out-notifications.
The /netconf-state/statistics subtree provides global server counters: netconf-start-time, in-bad-hellos, in-sessions, dropped-sessions, in-rpcs, in-bad-rpcs, out-rpc-errors, and out-notifications.
The partial-lock list entry contains a lock-id (uint32), lock-info (locked-by-session, locked-time), one or more XPath select expressions used to request the lock, and a list of locked-node instance-identifiers defining the actual locked scope.
The schema-format identity hierarchy defines base identity 'schema-format' with derived identities: xsd, yang, yin, rng, and rnc, representing the supported data modeling language formats for schema retrieval.
The transport identity hierarchy defines base identity 'transport' with derived identities: netconf-ssh (RFC 4742), netconf-soap-over-beep (RFC 4743), netconf-soap-over-https (RFC 4743), netconf-beep (RFC 4744), and netconf-tls (RFC 5539).
This document registers the module 'ietf-netconf-monitoring' with namespace 'urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring' and prefix 'ncm' in the YANG Module Names registry.
This document registers the URI 'urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring' in the IETF XML Registry (RFC 3688) as an XML namespace.
The lowest NETCONF layer is the secure transport layer; the mandatory-to-implement secure transport is SSH (RFC 4742). Access to sensitive monitoring data nodes must be controlled via NETCONF access control mechanisms.
The /netconf-state/sessions/session/username leaf contains identity information that could be exploited for authentication attacks; read access MUST be controlled. This username SHOULD NOT be used for access control purposes without careful consideration, as different servers may report identical usernames for different persons.