Requesting Interface Statistics


Marek Gradzki -X (mgradzki - PANTHEON TECHNOLOGIES@Cisco) <mgradzki@...>
 

Hello Sivan,

 

you request is valid. Reading statistics is currently not supported.

 

We often do not support fully external models (e.g. ietf ones) we expose

if there is limited/no vpp support for some feature.

 

VPP 18.01 has much better support for reading statistics:

https://git.fd.io/vpp/tree/src/vpp/stats/stats.api

 

so now it should be possible to add support for reading statistics container.

 

If you find the feature useful,

feel free to create jira ticket for hc2vpp project at https://jira.fd.io.

 

To check which VPP APIs are currently supported via NETCONF/RESTCONF

and how they are mapped to the YANG models,

please take a look at API documentation from our release notes.

Here is link for 17.10:

https://docs.fd.io/hc2vpp/1.17.10/hc2vpp-parent/release-notes-aggregator/release_notes.html#_api_documentation

 

Regards,

Marek

 

From: honeycomb-dev-bounces@... [mailto:honeycomb-dev-bounces@...] On Behalf Of sivan.b@...
Sent: 10 stycznia 2018 18:49
To: honeycomb-dev@...
Subject: [honeycomb-dev] Requesting Interface Statistics

 

Hi,

 

I want to get interface statistics from VPP using an RPC from Honeycomb. I issue the following request:

<rpc message-id="m-0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<get>

<filter xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:type="subtree">

<interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">

<interface>

<name>host-vpp1out</name>

</interface>

</interfaces-state>

</filter>

</get>

</rpc>

 

Looking at the ietf-interfaces yang model, I see there is a statistics container in the interface list of interfaces-state, so I expect the response to include the interface’s statistics, but it does not:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-0">

<data>

<interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">

<interface>

<name>host-vpp1out</name>

<phys-address>02:fe:66:4f:fa:48</phys-address>

<admin-status>up</admin-status>

<ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">

<address>

<ip>10.10.1.2</ip>

<prefix-length>24</prefix-length>

</address>

</ipv4>

<ethernet xmlns="urn:opendaylight:params:xml:ns:yang:v3po">

<mtu>9216</mtu>

</ethernet>

<oper-status>up</oper-status>

<if-index>2</if-index>

<type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type>

</interface>

</interfaces-state>

</data>

</rpc-reply>

 

Am I misinterpreting the yang model? Should I issue a different request to get statistics?

 

Thanks for the help,

Sivan.