You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/victorialogs/data-ingestion/Journald.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,10 @@ On a client site which should already have journald please install additionally
16
16
```
17
17
[Upload]
18
18
URL=http://localhost:9428/insert/journald
19
+
# Starting v258 systemd-journal-upload custom HTTP headers and compression are supported
20
+
# Header=AccountID: 5
21
+
# Header=ProjectID: 10
22
+
# Compression=zstd:4 lz4:2
19
23
```
20
24
21
25
Substitute the `localhost:9428` address inside `endpoints` section with the real TCP address of VictoriaLogs.
@@ -26,6 +30,9 @@ Port 9428 is not the default port associated with with `systemd-journal-upload`
26
30
27
31
VictoriaLogs uses the `__REALTIME_TIMESTAMP` field as [`_time` field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#time-field)
28
32
for the logs ingested via journald protocol. Other field can be used instead of `__REALTIME_TIMESTAMP` by specifying it via `-journald.timeField` command-line flag.
33
+
> [!NOTE]
34
+
> Starting systemd-journal-upload v258 time field can be set using `VL-Time-Field` HTTP header.
35
+
29
36
See [the list of supported Journald fields](https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html).
30
37
31
38
## Level field
@@ -37,6 +44,8 @@ VictoriaLogs automatically sets the `level` log field according to the [`PRIORIT
37
44
VictoriaLogs uses `(_MACHINE_ID, _HOSTNAME, _SYSTEMD_UNIT)` as [stream fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields)
38
45
for logs ingested via journald protocol. The list of log stream fields can be changed via `-journald.streamFields` command-line flag if needed,
39
46
by providing comma-separated list of journald fields from [this list](https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html).
47
+
> [!NOTE]
48
+
> Starting systemd-journal-upload v258 stream fields can be set using `VL-Stream-Fields` HTTP header.
40
49
41
50
Please make sure that the log stream fields passed to `-journald.streamFields` do not contain fields with high number or unbound number of unique values,
42
51
since this may lead to [high cardinality issues](https://docs.victoriametrics.com/victorialogs/keyconcepts/#high-cardinality).
@@ -53,6 +62,8 @@ The following Journald fields are also good candidates for stream fields:
53
62
VictoriaLogs can be configured for skipping the given [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model)
54
63
for logs ingested via journald protocol, via `-journald.ignoreFields` command-line flag, which accepts comma-separated list of log fields to ignore.
55
64
This list can contain log field prefixes ending with `*` such as `some-prefix*`. In this case all the fields starting from `some-prefix` are ignored.
65
+
> [!NOTE]
66
+
> Starting systemd-journal-upload v258 ignored fields can be set using `VL-Ignore-Fields` HTTP header.
56
67
57
68
See [the list of supported Journald fields](https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html).
58
69
@@ -61,6 +72,8 @@ See [the list of supported Journald fields](https://www.freedesktop.org/software
61
72
By default VictoriaLogs stores logs ingested via journald protocol into `(AccountID=0, ProjectID=0)`[tenant](https://docs.victoriametrics.com/victorialogs/#multitenancy).
62
73
This can be changed by passing the needed tenant in the format `AccountID:ProjectID` at the `-journald.tenantID` command-line flag.
63
74
For example, `-journald.tenantID=123:456` would store logs ingested via journald protocol into `(AccountID=123, ProjectID=456)` tenant.
75
+
> [!NOTE]
76
+
> Starting systemd-journal-upload v258 tenant information can be set using `AccountID` and `ProjectID` HTTP headers.
0 commit comments