Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document dateparser-enrich #160

Merged
merged 1 commit into from
Feb 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions parsers/s02-enrich/crowdsecurity/dateparse-enrich.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
Parses time in logs and alter the event time.
It is mandatory when using crowdwatch with 'cold' logs.
Parses timestamp strings in logs to be used in [forensic mode](https://doc.crowdsec.net/Crowdsec/v1/user_guide/forensic_mode/). The following formats are currently supported :

- RFC3339
- `02/Jan/2006:15:04:05 -0700`
- `Mon Jan 2 15:04:05 2006`
- `02-Jan-2006 15:04:05 europe/paris`
- `01/02/2006 15:04:05`
- `2006-01-02 15:04:05.999999999 -0700 MST`
- `Jan 2 15:04:05`
- `Mon Jan 02 15:04:05.000000 2006`
- `2006-01-02T15:04:05Z07:00`
- `2006/01/02`
- `2006/01/02 15:04`
- `2006-01-02`
- `2006-01-02 15:04`

The `StrTime` item of the event is parsed by default. See [crowdsecurity/syslog-logs](https://hub.crowdsec.net/author/crowdsecurity/configurations/syslog-logs) as an example of a parser setting this field for `crowdsecurity/dateparse-enrich`.