Skip to content

Commit f6ef86e

Browse files
docs: mention compression and custom headers in journald docs (#770)
1 parent b80fc1b commit f6ef86e

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM ubuntu:24.04
1+
FROM debian:forky
22

33
RUN \
44
apt update && \
55
apt install -y \
66
systemd \
77
systemd-journal-remote && \
8-
sed -i 's/# URL=/URL=http:\/\/victorialogs:9428\/insert\/journald/g' /etc/systemd/journal-upload.conf && \
8+
sed -i 's/# URL=/URL=http:\/\/victorialogs:9428\/insert\/journald\nHeader=AccountID: 10\nHeader=ProjectID: 10/g' /etc/systemd/journal-upload.conf && \
99
systemctl enable systemd-journal-upload.service

docs/victorialogs/data-ingestion/Journald.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ On a client site which should already have journald please install additionally
1616
```
1717
[Upload]
1818
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
1923
```
2024

2125
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`
2630

2731
VictoriaLogs uses the `__REALTIME_TIMESTAMP` field as [`_time` field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#time-field)
2832
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+
2936
See [the list of supported Journald fields](https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html).
3037

3138
## Level field
@@ -37,6 +44,8 @@ VictoriaLogs automatically sets the `level` log field according to the [`PRIORIT
3744
VictoriaLogs uses `(_MACHINE_ID, _HOSTNAME, _SYSTEMD_UNIT)` as [stream fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields)
3845
for logs ingested via journald protocol. The list of log stream fields can be changed via `-journald.streamFields` command-line flag if needed,
3946
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.
4049
4150
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,
4251
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:
5362
VictoriaLogs can be configured for skipping the given [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model)
5463
for logs ingested via journald protocol, via `-journald.ignoreFields` command-line flag, which accepts comma-separated list of log fields to ignore.
5564
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.
5667
5768
See [the list of supported Journald fields](https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html).
5869

@@ -61,6 +72,8 @@ See [the list of supported Journald fields](https://www.freedesktop.org/software
6172
By default VictoriaLogs stores logs ingested via journald protocol into `(AccountID=0, ProjectID=0)` [tenant](https://docs.victoriametrics.com/victorialogs/#multitenancy).
6273
This can be changed by passing the needed tenant in the format `AccountID:ProjectID` at the `-journald.tenantID` command-line flag.
6374
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.
6477
6578
See also:
6679

0 commit comments

Comments
 (0)