liveBook · Manning

Parsing

As explained in Logs and Telemetry

Parsing is the transformation of textual or encoded content into a structured representation according to its syntax.

Parsing transforms log content into meaningful values and structured data. Those values can enrich event payloads, support routing, trigger notifications, and prevent sensitive information from leaving an application. section 6.2

Use parsed values to:

  • Build destination-specific structured payloads from unstructured events. section 6.2
  • Route errors using values such as error codes, exception types, and packages. section 6.2
  • Send security-related events to application repositories and security-monitoring tools. section 6.2
  • Remove or mask sensitive values, including payment-card and bank-account details, before transmission. section 6.2

In Fluent Bit, parsing is performed through a parser filter. Parser definitions live in one or more files named by parsers_file in [SERVICE]. Each definition uses [PARSER], a unique name, and a format; chained parser files are possible when one parser feeds another. section 6.3

Attach a parser to an input

A parser configuration can define a regex parser, while a filter selects it for matching events: set parsers_file in [SERVICE], use name parser in [FILTER], identify the source field with key_name log, and select the definition with parser apache. preserve_key and reserve_data control whether original and unparsed data remain. section 6.3

Listing 6.1 Example parser file: parsers.conf
[PARSER]
    name myApache          #1
    format regex                          #2
    regex ^(?<INT>[^ ]+) (?<FLOAT>[^ ]+) 
 (?<BOOL>[^ ]+) (?<STRING>.+)$     #3

Inspect a compact parser definition using named regex captures for integer, floating-point, Boolean, and string values. section 6.3

How Logs and Telemetry covers it

How deep it goes
Explains operational purposes and Fluent Bit configuration, but defers detailed filter capabilities and parser-specific attributes.
Examples
Uses regex parser definitions, Java-style error logs, and Fluent Bit input-filter-output configurations.
What you can do after
Apply it via Fluent Bit by defining parsers, attaching them through a parser filter, and routing the resulting events.
How it connects
Connects parsing with log events, structured data, filters, routing, remediation, security monitoring, and compliance.

Also explained in

Compare how 13 books explain parsing →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Logs and Telemetry. The section links point to the parts of the book it draws on.