is there any way to filter data from NagIOS available api for logentries based on date
(nagiosxi/api/v1/objects/logentries)
how to filter data from Nagios API based on date time
-
- Posts: 6
- Joined: Mon Sep 16, 2019 6:54 am
-
- 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
You can do something like this
this shows between 2019-10-21 02:00:00 & 2019-10-21 04:00:00
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