module ietf-pcep-stats {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-pcep-stats";
prefix pcep-stats;
import ietf-pcep {
prefix pcep;
reference
"RFC 9826: A YANG Data Model for the Path Computation
Element Communication Protocol (PCEP)";
}
import ietf-yang-types {
prefix yang;
reference
"RFC 6991: Common YANG Data Types";
}
organization
"IETF PCE (Path Computation Element) Working Group";
contact
"WG Web:
WG List:
Editor: Dhruv Dhody
";
description
"The YANG module augments the Path Computation Element
Communication Protocol (PCEP) YANG operational
model with statistics, counters and telemetry data.
Copyright (c) 2025 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 Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 9826; see the
RFC itself for full legal notices.";
revision 2025-09-12 {
description
"Initial revision.";
reference
"RFC 9826: A YANG Data Model for the Path Computation
Element Communication Protocol (PCEP)";
}
/*
* Features
*/
feature reset-all {
description
"Support resetting of all PCEP statistics.";
}
/*
* Groupings
*/
grouping stats {
description
"This grouping defines statistics for PCEP. It is used
for both peer and current sessions. Since this grouping
includes a relative path, care needs to be taken while
using it.";
leaf discontinuity-time {
type yang:timestamp;
description
"The timestamp value of the time when the
statistics were last reset.";
}
container pce {
when "../../pcep:role = 'pce'"
+ "or "
+ "../../pcep:role = 'pcc-and-pce'" {
description
"Valid for PCEP peer as PCE.";
}
leaf rsp-time-avg {
type uint32;
units "milliseconds";
description
"The average response time. If an average response time
has not been calculated, then this leaf has the value
zero.";
}
leaf rsp-time-lwm {
type uint32;
units "milliseconds";
description
"The smallest (low-water mark) response time seen.
If no responses have been received, then this leaf has
the value zero.";
}
leaf rsp-time-hwm {
type uint32;
units "milliseconds";
description
"The greatest (high-water mark) response time seen.
If no responses have been received, then this object
has the value zero.";
}
leaf pcreq-sent {
type yang:counter32;
description
"The number of PCReq messages sent.";
}
leaf pcreq-rcvd {
type yang:counter32;
description
"The number of PCReq messages received.";
}
leaf pcrep-sent {
type yang:counter32;
description
"The number of PCRep messages sent.";
}
leaf pcrep-rcvd {
type yang:counter32;
description
"The number of PCRep messages received.";
}
leaf req-sent {
type yang:counter32;
description
"The number of requests sent. A request corresponds
1:1 with an RP object in a PCReq message. This might
be greater than pcreq-sent because multiple
requests can be batched into a single PCReq
message.";
}
leaf req-sent-pend-rep {
type yang:counter32;
description
"The number of requests that have been sent for
which a response is still pending.";
}
leaf req-sent-ero-rcvd {
type yang:counter32;
description
"The number of requests that have been sent for
which a response with an ERO object was received.
Such responses indicate that a path was
successfully computed by the peer.";
}
leaf req-sent-nopath-rcvd {
type yang:counter32;
description
"The number of requests that have been sent for
which a response with a NO-PATH object was
received. Such responses indicate that the peer
could not find a path to satisfy the
request.";
}
leaf req-sent-cancel-rcvd {
type yang:counter32;
description
"The number of requests that were cancelled with
a PCNtf message. This might be different than
pcntf-rcvd because not all PCNtf messages are
used to cancel requests, and a single PCNtf message
can cancel multiple requests.";
}
leaf req-sent-error-rcvd {
type yang:counter32;
description
"The number of requests that were rejected with a
PCErr message. This might be different than
pcerr-rcvd because not all PCErr messages are
used to reject requests, and a single PCErr message
can reject multiple requests.";
}
leaf req-sent-timeout {
type yang:counter32;
description
"The number of requests that have been sent to a peer
and have been abandoned because the peer has taken too
long to respond to them.";
}
leaf req-sent-cancel-sent {
type yang:counter32;
description
"The number of requests that were sent to the peer and
explicitly cancelled by the local PCEP entity sending
a PCNtf.";
}
leaf rep-rcvd-unknown {
type yang:counter32;
description
"The number of responses to unknown requests
received. A response to an unknown request is a
response whose RP object does not contain the
request ID of any request that is currently
outstanding on the session.";
}
description
"The stats related to PCE as peer.";
}
leaf pcerr-sent {
type yang:counter32;
description
"The number of PCErr messages sent.";
}
leaf pcerr-rcvd {
type yang:counter32;
description
"The number of PCErr messages received.";
}
leaf pcntf-sent {
type yang:counter32;
description
"The number of PCNtf messages sent.";
}
leaf pcntf-rcvd {
type yang:counter32;
description
"The number of PCNtf messages received.";
}
leaf keepalive-sent {
type yang:counter32;
description
"The number of Keepalive messages sent.";
}
leaf keepalive-rcvd {
type yang:counter32;
description
"The number of Keepalive messages received.";
}
leaf unknown-rcvd {
type yang:counter32;
description
"The number of unknown messages received.";
}
leaf corrupt-rcvd {
type yang:counter32;
description
"The number of corrupted PCEP messages received.";
}
container pcc {
when "../../pcep:role = 'pcc'"
+ "or "
+ "../../pcep:role = 'pcc-and-pce'" {
description
"Valid for PCEP peer as PCC.";
}
leaf req-rcvd {
type yang:counter32;
description
"The number of requests received. A request
corresponds 1:1 with an RP object in a PCReq
message.
This might be greater than pcreq-rcvd because
multiple requests can be batched into a single
PCReq message.";
}
leaf req-rcvd-pend-rep {
type yang:counter32;
description
"The number of requests that have been received for
which a response is still pending.";
}
leaf req-rcvd-ero-sent {
type yang:counter32;
description
"The number of requests that have been received for
which a response with an ERO object was sent. Such
responses indicate that a path was successfully
computed by the local PCEP entity.";
}
leaf req-rcvd-nopath-sent {
type yang:counter32;
description
"The number of requests that have been received for
which a response with a NO-PATH object was sent. Such
responses indicate that the local PCEP entity could
not find a path to satisfy the request.";
}
leaf req-rcvd-cancel-sent {
type yang:counter32;
description
"The number of requests received that were cancelled
by the local PCEP entity sending a PCNtf message.
This might be different than pcntf-sent because
not all PCNtf messages are used to cancel requests,
and a single PCNtf message can cancel multiple
requests.";
}
leaf req-rcvd-error-sent {
type yang:counter32;
description
"The number of requests received that were cancelled
by the local PCEP entity sending a PCErr message.
This might be different than pcerr-sent because
not all PCErr messages are used to cancel requests,
and a single PCErr message can cancel multiple
requests.";
}
leaf req-rcvd-cancel-rcvd {
type yang:counter32;
description
"The number of requests that were received from the
peer and explicitly cancelled by the peer sending
a PCNtf.";
}
leaf req-rcvd-unknown {
type yang:counter32;
description
"The number of unknown requests that have been
received. An unknown request is a request
whose RP object contains a request ID of zero.";
}
description
"The stats related to PCC as peer.";
}
container svec {
if-feature "pcep:svec";
description
"If synchronized path computation is supported.";
container pce {
when "../../../pcep:role = 'pce'"
+ "or "
+ "../../../pcep:role = 'pcc-and-pce'" {
description
"Valid for PCEP peer as PCE.";
}
leaf svec-sent {
type yang:counter32;
description
"The number of SVEC objects sent in PCReq messages.
An SVEC object represents a set of synchronized
requests.";
}
leaf svec-req-sent {
type yang:counter32;
description
"The number of requests sent that appeared in one
or more SVEC objects.";
}
description
"The SVEC stats related to PCE.";
}
container pcc {
when "../../../pcep:role = 'pcc'"
+ "or "
+ "../../../pcep:role = 'pcc-and-pce'" {
description
"Valid for PCEP peer as PCC.";
}
leaf svec-rcvd {
type yang:counter32;
description
"The number of SVEC objects received in PCReq
messages. An SVEC object represents a set of
synchronized requests.";
}
leaf svec-req-rcvd {
type yang:counter32;
description
"The number of requests received that appeared
in one or more SVEC objects.";
}
description
"The SVEC stats related to PCC as peer.";
}
}
container stateful {
if-feature "pcep:stateful";
description
"Stateful PCE-related statistics.";
container pce {
when "../../../pcep:role = 'pce'"
+ "or "
+ "../../../pcep:role = 'pcc-and-pce'" {
description
"Valid for PCEP peer as PCE.";
}
leaf pcrpt-sent {
type yang:counter32;
description
"The number of PCRpt messages sent.";
}
leaf pcupd-rcvd {
type yang:counter32;
description
"The number of PCUpd messages received.";
}
leaf rpt-sent {
type yang:counter32;
description
"The number of LSP reports sent. An LSP report
corresponds 1:1 with an LSP object in a PCRpt
message. This might be greater than
pcrpt-sent because multiple reports can
be batched into a single PCRpt message.";
}
leaf upd-rcvd {
type yang:counter32;
description
"The number of LSP updates received. An LSP update
corresponds 1:1 with an LSP object in a PCUpd
message.
This might be greater than pcupd-rcvd because
multiple updates can be batched into a single
PCUpd message.";
}
leaf upd-rcvd-unknown {
type yang:counter32;
description
"The number of updates to unknown LSPs
received. An update to an unknown LSP is a
update whose LSP object does not contain the
PLSP-ID of any LSP that is currently
present.";
}
leaf upd-rcvd-undelegated {
type yang:counter32;
description
"The number of updates to not delegated LSPs
received. An update to an undelegated LSP is a
update whose LSP object does not contain the
PLSP-ID of any LSP that is currently
delegated to the current PCEP session.";
}
leaf upd-rcvd-error-sent {
type yang:counter32;
description
"The number of updates to LSPs received that were
responded by the local PCEP entity by sending a
PCErr message.";
}
description
"The stateful stats related to PCE as peer";
}
container pcc {
when "../../../pcep:role = 'pcc'"
+ "or "
+ "../../../pcep:role = 'pcc-and-pce'" {
description
"Valid for PCEP peer as PCC.";
}
leaf pcrpt-rcvd {
type yang:counter32;
description
"The number of PCRpt messages received.";
}
leaf pcupd-sent {
type yang:counter32;
description
"The number of PCUpd messages sent.";
}
leaf rpt-rcvd {
type yang:counter32;
description
"The number of LSP reports received. An LSP report
corresponds 1:1 with an LSP object in a PCRpt
message.
This might be greater than pcrpt-rcvd because
multiple reports can be batched into a single
PCRpt message.";
}
leaf rpt-rcvd-error-sent {
type yang:counter32;
description
"The number of reports of LSPs received that were
responded by the local PCEP entity by sending a
PCErr message.";
}
leaf upd-sent {
type yang:counter32;
description
"The number of LSP updates sent. An LSP update
corresponds 1:1 with an LSP object in a PCUpd
message. This might be greater than
pcupd-sent because multiple updates can
be batched into a single PCUpd message.";
}
description
"The stateful stats related to PCC as peer.";
}
container initiation {
if-feature "pcep:pce-initiated";
description
"PCE-initiated related statistics.";
container pcc {
when "../../../../pcep:role = 'pcc'"
+ "or "
+ "../../../../pcep:role = 'pcc-and-pce'" {
description
"Valid for PCEP peer as PCC.";
}
leaf pcinitiate-sent {
type yang:counter32;
description
"The number of PCInitiate messages sent.";
}
leaf initiate-sent {
type yang:counter32;
description
"The number of LSP initiations sent via PCE.
An LSP initiation corresponds 1:1 with an LSP
object in a PCInitiate message. This might be
greater than pcinitiate-sent because
multiple initiations can be batched into a
single PCInitiate message.";
}
description
"The initiation stats related to PCC as peer.";
}
container pce {
when "../../../../pcep:role = 'pce'"
+ "or "
+ "../../../../pcep:role = 'pcc-and-pce'" {
description
"Valid for PCEP peer as PCE.";
}
leaf pcinitiate-rcvd {
type yang:counter32;
description
"The number of PCInitiate messages received.";
}
leaf initiate-rcvd {
type yang:counter32;
description
"The number of LSP initiations received from
PCE. An LSP initiation corresponds 1:1 with
an LSP object in a PCInitiate message. This
might be greater than pcinitiate-rcvd
because multiple initiations can be batched
into a single PCInitiate message.";
}
leaf initiate-rcvd-error-sent {
type yang:counter32;
description
"The number of initiations of LSPs received
that were responded to by the local PCEP entity
by sending a PCErr message.";
}
description
"The initiation stats related to PCE as peer.";
}
}
}
container path-key {
when "../../pcep:role = 'pcc'"
+ "or "
+ "../../pcep:role = 'pcc-and-pce'" {
description
"Valid for PCEP peer as PCC.";
}
if-feature "pcep:path-key";
description
"If path-key is supported.";
leaf unknown-path-key {
type yang:counter32;
description
"The number of attempts to expand an unknown
path-key.";
}
leaf exp-path-key {
type yang:counter32;
description
"The number of attempts to expand an expired
path-key.";
}
leaf dup-path-key {
type yang:counter32;
description
"The number of duplicate attempts to expand the same
path-key.";
}
leaf path-key-no-attempt {
type yang:counter32;
description
"The number of expired path-keys with no attempt to
expand it.";
}
}
action reset-statistics {
description
"The reset action will clear the statistics at the
associated container.";
input {
leaf reset-at {
type yang:date-and-time;
description
"The time when the reset was issued.";
}
}
output {
leaf reset-finished-at {
type yang:date-and-time;
description
"The time when the reset finished.";
}
}
}
}
/*
* Augment modules to add statistics
*/
augment "/pcep:pcep/pcep:entity/pcep:peers/pcep:peer" {
description
"Augmenting the statistics.";
container stats {
config false;
description
"The container for all statistics at peer level.";
uses stats {
description
"Since PCEP sessions can be ephemeral, the peer statistics
tracks a peer even when no PCEP session currently exists
to that peer. The statistics contained are an aggregate
of the statistics for all successive sessions to that
peer.";
}
leaf sess-setup-ok {
type yang:counter32;
config false;
description
"The number of PCEP sessions successfully established with
the peer, including any current session. This counter is
incremented each time a session with this peer is
successfully established.";
}
leaf sess-setup-fail {
type yang:counter32;
config false;
description
"The number of PCEP sessions with the peer
that have been attempted but failed
before being fully established. This
counter is incremented each time a
session retry to this peer fails.";
}
leaf req-sent-closed {
when "../../pcep:role = 'pce'"
+ "or "
+ "../../pcep:role = 'pcc-and-pce'" {
description
"Valid for PCEP peer as PCE.";
}
type yang:counter32;
description
"The number of requests that were sent to the peer and
implicitly cancelled when the session they were sent
over was closed.";
}
leaf req-rcvd-closed {
when "../../pcep:role = 'pcc'"
+ "or "
+ "../../pcep:role = 'pcc-and-pce'" {
description
"Valid for PCEP peer as PCC.";
}
type yang:counter32;
description
"The number of requests that were received from the peer
and implicitly cancelled when the session they were
received over was closed.";
}
}
}
augment "/pcep:pcep/pcep:entity/pcep:peers/pcep:peer/"
+ "pcep:sessions/pcep:session" {
description
"Augmenting the statistics.";
container stats {
description
"The container for all statistics at session level.";
uses stats {
description
"The statistics contained are for the current sessions to
that peer. These are lost when the session goes down.";
}
}
}
rpc reset-pcep-statistics-all {
if-feature "reset-all";
description
"Reset all the PCEP statistics collected across all peers
and sessions. This RPC is used if the implementation
supports a mechanism to reset all PCEP statistics across
all peers and sessions through mechanisms such as by
walking a list of pointers to those peers and sessions.
If this mechanism is not supported, implementations must
reset PCEP statistics individually by invoking the action
for each peer and session.";
}
}