-
Notifications
You must be signed in to change notification settings - Fork 24
Date Processor
Karina-Bulatov edited this page Dec 15, 2022
·
13 revisions
This processor parses a date field and outputs the date to the "targetField" in a format that elasticsearch supports.
Date parsing should always have an existing targetField which is already mapped as a date or it should be a new field.
- field
- targetField (default = @timestamp optional)
- formats - An array, one of these: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
- timeZone - one of these: https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html (optional) You can try to use this timezone list http://joda-time.sourceforge.net/timezones.html but make sure to test because not all zones exist in sawmill. You can also use this tool to find the TZ based on location, https://www.zeitverschiebung.net/en/all-countries.html
- outputFormat - one of these: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
Sawmill PREBUILT date parsing FORMATS:
- UNIX
- UNIX_MS
- ISO8601
- ELASTIC
{
"steps": [
{
"date": {
"config": {
"field": "timestamp",
"targetField": "@timestamp",
"formats": [
"ISO8601",
"UNIX_MS"
]
}
}
}
]
}
{
"steps": [
{
"date": {
"config": {
"field": "timestamp",
"targetField": "@timestamp",
"timeZone": "Europe/Paris",
"formats": [
"MMMM dd.... yyyy hh:mm:ss a 'CEST'",
"MMMM d.... yyyy hh:mm:ss a 'CEST'",
"MMMM d.... yyyy hh:mm:ss a 'CEST'"
]
}
}
}
]
}
- Home
-
Pipelines
-
Processors
- Add Field Processor
- Add Tag Processor
- AhoCorasick Processor
- Anonymize Processor
- Append List Processor
- Arrays Intersect Processor
- Base64 Decode Processor
- Convert Processor
- CSV Processor
- Date Processor
- Drop Processor
- External Mapping Source Processor
- GeoIP Processor
- Grok Processor
- JSON Processor
- Key Value Processor
- LowerCase Processor
- Math Processor
- Remove Field Processor
- Remove Tag Processor
- Rename Field Processor
- Split Processor
- Strip Processor
- Substitue Processor
- Substring Processor
- Translate Processor
- UpperCase Processor
- User Agent Processor
- URL Decode Processor
- XML Processor
- DeDot Processor
- Doc Size Processor
- If statement
- Additional Commands
-
Processors