Obtaining historical events from target system
Historical events are retrieved in batches by REST API requests (queries), sent in a serial manner, with each query covering an evenly partitioned time-line.
The following properties in the juniper_contrail.props are used:
- InitialResync
- InitialResyncWindow
- ResyncBatchTimespan
- UseLastResyncTimestamp
For details about these properties, see Properties and command line options and Properties and command line options provided by the Java Probe Integration Library (probe-sdk-java) version 4.0.
When InitialResync is set to true, the probe performs resynchronization for historical data from a time window of the length specified by the InitialResyncWindow property. The RESTAPI module then sends multiple queries of a fragmented time frame, specified by the ResyncBatchTimespan property that covers the entire timeline of interest, with new queries starting one microsecond after the end time of the preceding query. By default, the initial resynchronization is offset to 3 days before probe startup, with a maximum time frame per query of 5 minutes over the timeline covered in initial resynchronization.
The start time of the initial resynchronization is determined by the following properties: InitialResyncWindow and UseLastResyncTimestamp. If UseLastResyncTimestamp is set to true, and there is a timestamp recorded in the $OMNIHOME/var/juniper_contrail.timestamp file, then the start time is one microsecond after that timestamp. If UseLastResyncTimestamp is set to false or there is no previously recorded timestamp, then the start time is the offset from probe startup time based on the length of InitialResyncWindow.
Failure recovery on unsuccessful queries
Some queries may timeout or fail because of system environment issues, such as connection
stability. To prevent data loss, the probe retries these failed queries. If the probe detects the
target system cannot be reached using ping
, it perceives the connection as down and
stops sending queries during this period to prevent wasted query retry attempts. The probe discards
a query after four unsuccessful attempts.