Skip to content

Commit

Permalink
Update logql.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Nov 10, 2023
1 parent 24b8a44 commit 6e989e3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs/guide/logql.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,17 @@ The json parser operates in two modes:
### ** logfmt **
The logfmt parser extracts any `key=value` pairs from the processed logs.

```
YYYY-MM-DDT00:00:00Z ... name=qryn value=123 something=else
```
Example:

##### Input
* ```YYYY-MM-DDT00:00:00Z ... somelog name=qryn value=123 something=else```

##### LogQL
* ```{type="clickhouse"} |~"somelog" | logfmt```

##### Extracted Labels
* ```{ name: "qryn", value: 123, something: "else" }```


### ** regexp **
The regexp parser operates against log string and requires named groups for matching.
Expand Down

0 comments on commit 6e989e3

Please sign in to comment.