Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions pipeline/parsers/ltsv.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# LTSV

The **ltsv** parser allows to parse [LTSV](http://ltsv.org/) formatted texts.
The _LTSV_ parser lets you parse data in the [Labeled Tab-separated Values (LTSV)](http://ltsv.org/) format.

Labeled Tab-separated Values \(LTSV format is a variant of Tab-separated Values \(TSV\). Each record in a LTSV file is represented as a single line. Each field is separated by TAB and has a label and a value. The label and the value have been separated by ':'.
LTSV is a variant of the Tab-separated Values (TSV) format. Each record in an LTSV file is represented as a single line. Each field is separated by a tab and has a label and a value. The label and its value are separated by a colon (`:`).

Here is an example how to use this format in the apache access log.
Here is an example how to use this format in the Apache access log.

Config this in httpd.conf:
Configure this in `httpd.conf`:

```text
LogFormat "host:%h\tident:%l\tuser:%u\ttime:%t\treq:%r\tstatus:%>s\tsize:%b\treferer:%{Referer}i\tua:%{User-Agent}i" combined_ltsv
Expand Down Expand Up @@ -42,7 +42,7 @@ parsers:
{% endtab %}
{% endtabs %}

The following log entry is a valid content for the parser defined above:
The following log entry is valid content for the previously defined parser:

```text
host:127.0.0.1 ident:- user:- time:[10/Jul/2018:13:27:05 +0200] req:GET / HTTP/1.1 status:200 size:16218 referer:http://127.0.0.1/ ua:Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Expand All @@ -60,4 +60,4 @@ After processing, it internal representation will be:
[1531222025.000000000, {"host"=>"127.0.0.1", "ident"=>"-", "user"=>"-", "req"=>"GET /assets/css/style.css HTTP/1.1", "status"=>200, "size"=>1279, "referer"=>"http://127.0.0.1/", "ua"=>"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0"}]
```

The time has been converted to Unix timestamp \(UTC\).
The time was converted to Unix timestamp (UTC).
1 change: 1 addition & 0 deletions vale-styles/FluentBit/Acronyms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ exceptions:
- LLDB
- LLVM
- LTS
- LTSV
- MQTT
- NET
- NGINX
Expand Down