how to filter data from Nagios API based on date time

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

how to filter data from Nagios API based on date time

Postby abhishekkayal89 » Mon Oct 21, 2019 5:31 am

is there any way to filter data from NagIOS available api for logentries based on date
(nagiosxi/api/v1/objects/logentries)
abhishekkayal89
 
Posts: 6
Joined: Mon Sep 16, 2019 6:54 am

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

Postby scottwilkerson » Mon Oct 21, 2019 6:43 am

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 16664
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios XI

Who is online

Users browsing this forum: No registered users and 17 guests