cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
783
Views
5
Helpful
1
Replies

Filtering EPG traffic stats data from APIC

Gesha2424
Level 1
Level 1

I want to be able to get traffic stats from specific EPG via API.

Looking at the manual, this call is recommended:

https://apic-ip-address/api/node/mo/uni/tn-newproject/ap-app1/epg-web-epg.xml?querytarget=self&rsp-subtree-include=stats

Leaving aside a typo (it is supposed to be query-target), this call does indeed work, but it produces a HUGE response with a lot of historic data and is taking well over a second to complete. It seems that response has hourly aggregates of traffic counters, but it goes on for days if not weeks.

I don't need that, I actually want to be able to make those queries hourly and then get the last hour - so that I can graph it.

I tried adding rsp-subtree-filter=eq(l2IngrBytesAgHist1h.lastCollOffset,"3600") or other filters, but it doesn't seem to work - I am still getting the same huge response with like 30K lines. I also still get the same 30K lines when I set page-size=10 and page=0

Any idea of what I am missing with filter statements or how to get some more manageable (and most important - much faster response) data from the APIC?

1 Accepted Solution

Accepted Solutions

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi,

Try using the following filter:

rsp-subtree-filter=eq(l2IngrBytesAgHist1h.index,"1") 

This will show the last hour counter.

 

Regards,

Sergiu

View solution in original post

1 Reply 1

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi,

Try using the following filter:

rsp-subtree-filter=eq(l2IngrBytesAgHist1h.index,"1") 

This will show the last hour counter.

 

Regards,

Sergiu

Save 25% on Day-2 Operations Add-On License