Symptom
With Datagen timestamp extraction set to auto, Timestamp anchor unset, and Length at 150:
- Events with
eventTimewithin the first 150 characters show the timestamp template in_rawduring Live Capture instead of the generated timestamp. - Events with
eventTimebeyond the first 150 characters retain the original sample data timestamp ineventTime.
The timestamp template should not remain in _raw. The event should either receive the generated timestamp or retain its original value when no match occurs:
"eventTime":"${timestamp:%Y-%m-%dT%H:%M:%S.%LZ}"
Environment
- Cribl Stream Datagen template created from sample data containing
eventTime. - Datagen timestamp extraction set to
auto, Timestamp anchor unset, and Length150.
Resolution
- Navigate to Data Routes or Pipelines.
- Select Import Data in the right Preview pane.
- Load the sample data.
- Select Create a Datagen File.
- On the resulting screen, set Timestamp type to
auto. - Enter
\\"eventTime\\":\\"in Timestamp anchor. - Leave Length at
150. - Select Save as Datagen File.
- Navigate to Data > Sources.
- Open the existing Datagen source.
- Update Data generator file to use the newly created Datagen file.
- Select Save.
- Select Commit & Deploy.
- Run a live capture on the source.
- Verify in Live Capture that all events have the generated timestamp in
eventTimeand that the timestamp template is not present in_raw.
Cause
Cause: Not yet determined. The default Length of 150 does not reach eventTime when it falls beyond the first 150 characters. The case does not establish why timestamp replacement also failed for events with eventTime inside the scan window. Setting an explicit anchor resolved both behaviors.
Additional Information
- The explicit
eventTimeanchor keeps Length at150while directing timestamp replacement toeventTime. - Use Datagens to Simulate Live Data
- Event Breakers
