![]() |
![]() |
Subject: | Zenoss REST API (curl) not retuning more than 1000 rows |
Author: | Anjan Kumar Tripathy |
Posted: | 2021-06-04 11:56 |
Subject: | RE: Zenoss REST API (curl) not retuning more than 1000 rows |
Author: | Michael Rogers |
Posted: | 2021-06-04 18:44 |
Anjan,
I don't currently have a test instance with more than 1000 events to confirm, but I have some suspicions.
I don't believe the events router will allow you to request more than 1000, so your "limit":200000
will likely give back the max of 1000. However, once you have the first 1000 events, you should be able to increment your "start"
by 1000 to get the next batch along with "page"
in single digit increments. To see what I mean, here are a few sample payloads:
{"action":"EventsRouter","method":"query","data":[{"params":{"eventState":[0,1],"severity":[5,4,3,2],"tags":[],"excludeNonActionables":false},"keys":["eventState","severity","device","component","eventClass","summary","firstTime","lastTime","count","evid","eventClassKey","message"],"page":1,"start":0,"limit":200,"sort":"severity","dir":"DESC"}],"type":"rpc","tid":5}
{"action":"EventsRouter","method":"query","data":[{"params":{"eventState":[0,1],"severity":[5,4,3,2],"tags":[],"excludeNonActionables":false},"keys":["eventState","severity","device","component","eventClass","summary","firstTime","lastTime","count","evid","eventClassKey","message"],"uid":"/cz0/zport/dmd","page":2,"start":200,"limit":200,"sort":"severity","dir":"DESC"}],"type":"rpc","tid":6}
{"action":"EventsRouter","method":"query","data":[{"params":{"eventState":[0,1],"severity":[5,4,3,2],"tags":[],"excludeNonActionables":false},"keys":["eventState","severity","device","component","eventClass","summary","firstTime","lastTime","count","evid","eventClassKey","message"],"uid":"/cz0/zport/dmd","page":3,"start":400,"limit":200,"sort":"severity","dir":"DESC"}],"type":"rpc","tid":9}
Let me know your results?
------------------------------
Michael J. Rogers
Senior Instructor - Zenoss
Austin TX
------------------------------
< |
Previous SolarWinds-style "live diagrams" functionality |
Next Modelling a list of devices |
> |