cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1040
Views
2
Helpful
7
Replies

Which YANG Models Support On-Change Telemetry

slarrarte
Level 1
Level 1

Hello,

I am working with NETCONF/RESTCONF and MDT (TIG Stack) on the IOS XE on Cat8kv reservable sandbox.  I have not been able to figure out how to stream interface state via on-change.  For reference, I am using the basic ietf-interfaces.yang model.  

So far, the subscription only becomes valid if it's set to periodic. 

Here is the YANG-modeled mdt subscription I am trying to make work:

{
"Cisco-IOS-XE-mdt-cfg:mdt-subscription": [
{
"subscription-id": "69",
"base": {
"stream": "yang-push",
"encoding": "encode-kvgpb",
"dampening period": "0",
"xpath": "/ietf-interfaces:interfaces-state/interface[name='Loopback69']/oper-status"
},
"mdt-receivers": {
"address": "10.10.20.50",
"port": "57500",
"protocol": "grpc-tcp"
}
}
]
}

I am aware that not all YANG models support on-change, and there doesn't seem to be any indicator of what models support it.  Is this just a case of ietf-interfaces.yang not supporting on-change, or am I configuring this incorrectly?

1 Accepted Solution

Accepted Solutions

From what i recall in the cisco-ios-xe-mdt-capabilities-oper.YANG model this can be queried to show information about the models that support `on-change` subscriptions and the transports ("NETCONF", "gRPC", "HTTP"). The response will contain a list of supported models and their capabilities, including, supported subscription modes:, whether a model supports "ON_CHANGE" subscriptions.

If you did a GET using NETCONF you should get a capabilities Information of this....

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get>
    <filter>
      <mdt-capabilities-oper xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-capabilities-oper">
      </mdt-capabilities-oper>
    </filter>
  </get>
</rpc>

There is a bit more on this here ---> https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/1711/b_1711_programmability_cg/m_1711_prog_ietf_telemetry.html#Cisco_Concept.dita_37229c82-8ddf-410d-a2ac-0d71b28ccf01

There is a also a good section here --> https://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-xe-17/217427-configure-model-driven-telemetry-on-cisc.html#anc37 

This is a good example byJeremy Cohoe --> https://github.com/jeremycohoe/cisco-ios-xe-mdt/blob/master/c9300-grpc-onchange-examples.cfg

Now, the next question is if this will work in the devnet sandbox? I am guessing you are using the devbox/jump host as the listener and not a external resource?

Hope this helps in some way.

 

 

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

View solution in original post

7 Replies 7

From what i recall in the cisco-ios-xe-mdt-capabilities-oper.YANG model this can be queried to show information about the models that support `on-change` subscriptions and the transports ("NETCONF", "gRPC", "HTTP"). The response will contain a list of supported models and their capabilities, including, supported subscription modes:, whether a model supports "ON_CHANGE" subscriptions.

If you did a GET using NETCONF you should get a capabilities Information of this....

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get>
    <filter>
      <mdt-capabilities-oper xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-capabilities-oper">
      </mdt-capabilities-oper>
    </filter>
  </get>
</rpc>

There is a bit more on this here ---> https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/1711/b_1711_programmability_cg/m_1711_prog_ietf_telemetry.html#Cisco_Concept.dita_37229c82-8ddf-410d-a2ac-0d71b28ccf01

There is a also a good section here --> https://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-xe-17/217427-configure-model-driven-telemetry-on-cisc.html#anc37 

This is a good example byJeremy Cohoe --> https://github.com/jeremycohoe/cisco-ios-xe-mdt/blob/master/c9300-grpc-onchange-examples.cfg

Now, the next question is if this will work in the devnet sandbox? I am guessing you are using the devbox/jump host as the listener and not a external resource?

Hope this helps in some way.

 

 

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Thank you for your help bigevilbeard,

I will be GETing the the MDT capabilities model from the router to see what models support on-change.

You are correct in assuming I am using the devnet sandbox environment.  More specifically, I have been using the IOS XE reservable sandbox and running code from my personal computer.

Sure thing, does the data return back to you machine over the VPN, i was not sure if this was possible, i saw some hacks with this ages back?

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Yes, you can directly interact with the sandbox nodes from your computer via VPN.  

Below is a snippet of the router's reply after GETing 

Cisco-IOS-XE-mdt-capabilities-oper:mdt-capabilities-oper-data

 

{
  "index": 16,
  "sub-caps": {
    "on-change-is-valid": [null],
    "on-change-supported": "mdt-cap-notif-config mdt-cap-notif-state"
  },
  "xpath": "/interfaces-ios-xe-oper:interfaces/interface"
},

 

I chose that snippet because the xpath pertaining to it is what I kinda want to set to make on-change updates.  What would be the indicator that I can create an on-change subscription?  Every single "on-change-is-valid" value is set to [null].  

So if i understand this, while "mdt-cap-notif-config" and "mdt-cap-notif-state" indicate the router supports notifications, the individual data points within this xpath might not support on-change updates.  So the on-change-is-valid" set to [null] for all data points, meaning the individual data points under /interfaces-ios-xe-oper:interfaces/interface might not individually support on-change updates. They might only support sample-based updates at pre-determined intervals.

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

I was under this impression too, but what has me skeptical is that not a single "on-change is valid" is not set to [null].  Perhaps this is a limitation on the sandbox environment.  Thank you for your help.