Date Parser

Overview

Date Parser is a filter that parses and converts character strings representing dates into another format, usually a date object that can be used in programming languages.


Configure Date Parser

To configure the Date Parser, follow the instructions below:

  1. In the Processor information section , enter general information for a processor according to the instructions in Processor . In this content, you will choose Processor type as Date Parser .

  2. In the Parsing rule section , enter the following information:

  • Enter Source field : field containing logs that will need to be parsed.

  • Enter Locate: the language used for the date format you desire. Locale affects the display and arrangement of day, date, month, and separators, for example year-month-day, day-month-year, or month-day-south.

  • Enter Timezone: time zone of a geographical region. Timezone affects the value of dates, because the same time can have different date values ​​depending on the time zone. If you do not select Locale and Timezone , we will default to the system's Locale and Timezone.

  • Enter the Target field : the field will be overwritten in the destination log project, normally you will not need to enter this information

  • Enter Pattern: contains date pattern to match with source field and parse out according to structure.

For example:

Items
Value
Meaning
Source logs
Destination logs

Source field

date

Field nguồn cần parser là date.

{ "date":"Apr 17 09:32:01 }

{"date":"2023-08-01T07:45:11.130Z",}

Locate

Vietnamese

Ngôn ngữ sử dụng là Vietnamese.

nt

nt

Timezone

N/A

Múi giờ lấy theo hệ thống.

nt

nt

Target field

date_parser

Field được parser sẽ ghi đè vô Destination log ở field date_parser.

nt

nt

Pattern

yyyy-MM-dd'T'HH:mm:ss.SSSZ

Định dạng ngày tháng của field date.

nt

nt

Store and reuse Parsing rules

  • You can store a parsing rule by checking Save this rule , then entering a memorable name for the parsing rule you want to store. The mnemonic name has a minimum length of 5 characters, a maximum length of 255 characters and can only include upper and lower case letters (az, AZ), numbers (0-9), and dots (.), space ( ), underscore (_), hyphen (-), and the @ character.

  • After the parsing rule has been stored, in subsequent processor creations you can reuse this rule by selecting Rule presets in the Pasing rule section.

Last updated