Page 1 of 1

how to filter data from Nagios API based on date time

Posted: Mon Oct 21, 2019 5:31 am
by abhishekkayal89
is there any way to filter data from NagIOS available api for logentries based on date
(nagiosxi/api/v1/objects/logentries)

Re: how to filter data from Nagios API based on date time

Posted: Mon Oct 21, 2019 6:43 am
by scottwilkerson
You can do something like this

Code: Select all

/nagiosxi/api/v1/objects/logentries?apikey=APIKEY&pretty=1&entry_time[]=gt:2019-10-21 02:00:00&entry_time[]=lt:2019-10-21 04:00:00
this shows between 2019-10-21 02:00:00 & 2019-10-21 04:00:00