04-08-2020 06:40 AM
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?
Solved! Go to Solution.
04-08-2020 07:03 AM
Hi,
Try using the following filter:
rsp-subtree-filter=eq(l2IngrBytesAgHist1h.index,"1")
This will show the last hour counter.
Regards,
Sergiu
04-08-2020 07:03 AM
Hi,
Try using the following filter:
rsp-subtree-filter=eq(l2IngrBytesAgHist1h.index,"1")
This will show the last hour counter.
Regards,
Sergiu
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide