Skip to content

Variable: monitoring ​

ts
const monitoring: object;

Defined in: netconf/src/operations/monitoring.ts:358

The RFC 6022 monitoring extension. Enable it with connect({ extensions: [monitoring] }).

Type Declaration ​

content ​

ts
readonly content: (ctx) => MonitoringContent;

Content layer: called once per client, after the hello, with the same context as ops. The result becomes client.content.<id>: calls that hand back decoded, typed data. State shared with ops belongs in a WeakMap keyed by ctx.sessionKey.

Parameters ​

ctx ​

ExtensionContext

Returns ​

MonitoringContent

description ​

ts
readonly description: "RFC 6022: fetch schemas, and read sessions, locks and statistics" = 'RFC 6022: fetch schemas, and read sessions, locks and statistics';

A one-line summary of what the extension adds, for tools and help text.

descriptors ​

ts
readonly descriptors: readonly [OperationDescriptor, OperationDescriptor];

Descriptors for the RPCs this extension adds (each needs a builder in requests), and for its reads (kind: 'read', run through the method of content they name).

id ​

ts
readonly id: "monitoring" = 'monitoring';

Becomes client.ops.<id> and client.content.<id>, for the layers the extension contributes to.

ops ​

ts
readonly ops: (ctx) => MonitoringOps;

Operations layer: called once per client, after the hello. The result becomes client.ops.<id>: calls that send operations and hand back XML, a reply, or a handle on what they started (a subscription, a lock).

Parameters ​

ctx ​

ExtensionContext

Returns ​

MonitoringOps

requests ​

ts
readonly requests: object;

Builders for the RPCs in descriptors, by RPC name. Each may type its own arguments ((args: { readonly name: string }) => …): the client calls it only with arguments whose names its descriptor lists, so give the descriptor required and type to match, and check values a tool could send wrongly.

requests.get-schema ​

ts
readonly "get-schema": (args) => OperationRequest = getSchemaRequest;

Builds the request for the <get-schema> RPC from its arguments.

Build a <get-schema> request from plain arguments. Sends nothing.

Parameters ​
args ​

Readonly<Record<string, unknown>>

Returns ​

OperationRequest

requires ​

ts
readonly requires: readonly ["urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"];

Capabilities the server must advertise, checked after the hello under capabilityCheck.

Released under the MIT Licence.