how to filter data from Nagios API based on date time

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
abhishekkayal89
Posts: 6
Joined: Mon Sep 16, 2019 6:54 am

how to filter data from Nagios API based on date time

Post by abhishekkayal89 »

is there any way to filter data from NagIOS available api for logentries based on date
(nagiosxi/api/v1/objects/logentries)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked