Custom time range filter is a new time based filter being added in the monitoring pages, which allows an user to filter runtime data for a user-defined time period. This filter will be available under feature flag oic.ics.console.monitoring.tracking.filter.custom-date-range.
With this, any user can select a time range as small as a minute and track only those instances which were processed/modified within the specified time range. Similar to other existing time window filters, this filter is preserved by default when user navigates from one monitoring page to another.
Note : The time range selected should be within the retention period, as data beyond Retention period are not retained. Even if selected time range is beyond retention period, only available data will be displayed.
Following steps show how to use the custom time range filter after enabling the feature flag.
1. Select the time window as shown below. "From" and "To" date fields for the new time filter are displayed.
2. Select the desired date and time in the "From" and "To" date fields.This defines the time range for the filter.
3. Click on the search button highlighted below.
4. This should now filter and display only those records which were last processed/updated within the selected time range.
For example, below screenshot shows records which are modified/processed between "06/06/2019 03:50 AM" to "06/06/2019 04:12 AM".
5. Navigating to any other monitoring page, which supports time window filter, will preserve the selected filter and apply it to the data being displayed on that page. For example, moving from the previous Track Instances page to Monitor Integrations preserves the same time window filter.
6. Similarly, moving to the Errors page will also preserve the same filter. In this example, for the selected time range, there are no Errors to be displayed.
This filter is also supported by monitoring REST APIs under /ic/api/integration/v1/monitoring context root.
So for example, if we need to find all instances which were updated between 01:56:20 and 01:56:25 on June 16th 2019, our cURL command will look like -
$ curl -k -v -u username:password -X GET https://hostname/ic/api/integration/v1/monitoring/instances?q=%7Bstartdate:%272019-06-16%2001:56:20%27,enddate:%272019-06-16%2001:56:25%27%7D
If we want to query for all errors between 01:56:20 and 02:56:20 on June 16th 2019 and want to limit the number of records to the first 5, then coupling this parameter with the offset and limit will provide the desired results. Do not forget to use single quote around the URL when using multiple URL parameters.
$ curl -k -v -u username:password -X GET 'https://hostname/ic/api/integration/v1/monitoring/errors?q=%7Bstartdate:%272019-06-16%2001:56:20%27,enddate:%272019-06-16%2002:56:25%27%7D&offset=0&limit=5'
As we can note, the date has to be provided in the YYYY-MM-DD HH:mm:ss format and we can use %20 to indicate a white-space in the URL and %27 indicates a single quote.
Hence the string startdate:%272019-06-16%2001:56:20%27 is essentially startdate:'2019-06-16 01:56:20'.