- The API of interface is providing only some static information like IP address configured and device ID. Is there anyway that we can get complete port traffic statistics (other than flow-analysis).
There isn't a general stats model yet. Using the APIC-EM inventory to get CLI/SNMP credentials and using direct device access to grab additional information. As we see RESTCONF/NETCONF take shape, that will be an alternative to gather operational data until models are added to APIC-EM itself.
- want to know how to use REST API to pass CLI commands and how to retrieved output.
The other way you could do this today, is to use the Prime Infrastructure API. For example to get the statistics, you could use the following request. By default it returns the samples for the past hour, but you can get historical as well.
curl -k 'https://user:password@adam-pi/webacs/api/vService/interfaces/metrics/tx?device=10.10.14.2&ifName=GigabitEthernet1/0/1'
<?xml version="1.0" ?>
<mgmtResponse responseType="operation" requestUrl="https://adam-pi/webacs/api/v2/op/statisticsService/interfaces/metrics/tx?device=10.10.14.2&amp;ifName=GigabitEthernet1/0/1" rootUrl="https://adam-pi/webacs/api/v2/op">
<metricData>
<currentDateTime>1463959584671</currentDateTime>
<description>Interface performance metric for tx</description>
<metricName>tx</metricName>
<metricRows>
<metricRows>
<XValue>1463956480</XValue>
<YValues>
<YValues>756.0</YValues>
</YValues>
</metricRows>
<metricRows>
<XValue>1463957382</XValue>
<YValues>
<YValues>2021.0</YValues>
</YValues>
</metricRows>
<metricRows>
<XValue>1463958285</XValue>
<YValues>
<YValues>756.0</YValues>
</YValues>
</metricRows>
<metricRows>
<XValue>1463959187</XValue>
<YValues>
<YValues>2036.0</YValues>
</YValues>
</metricRows>
</metricRows>
<resourceName>
Comments
0 comments
Please sign in to leave a comment.