Skip to content

Commit 9c8cb6c

Browse files
committedMay 1, 2024
Doc: Update man
1 parent 35059c4 commit 9c8cb6c

File tree

1 file changed

+39
-5
lines changed

1 file changed

+39
-5
lines changed
 

‎doc/index.rst

+39-5
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ systend-netlogd manual page
66
Description
77
-----------
88

9-
Forwards messages from the journal to other hosts over the network using the Syslog
10-
Protocol (RFC 5424). It can be configured to send messages to both unicast and multicast
11-
addresses. systemd-netlogd runs with own user systemd-journal-netlog. Starts sending logs
12-
when network is up and stops sending as soon as network is down (uses sd-network).
9+
Forwards messages from the journal to other hosts over the network using the
10+
Syslog Protocol (RFC 5424 and RFC 3339). It can be configured to send messages
11+
to both unicast and multicast addresses. systemd-netlogd runs with own user
12+
systemd-journal-netlog. Starts sending logs when network is up and stops sending
13+
as soon as network is down (uses sd-network). It reads from journal and forwards
14+
to network one by one. It does not use any extra disk space.
1315

1416
Configuration
1517
-------------
@@ -31,12 +33,24 @@ This will create a user systemd-journal-netlog
3133
3234
The the address string format is similar to socket units. See systemd.socket(1)
3335

36+
| Protocol=
37+
Specifies whether to use udp or tcp protocol. Defaults to udp.
38+
39+
| LogFormat=
40+
Specifies whether to use RFC 5424 format or RFC 3339 format. Takes one of rfc5424 or rfc3339. Defaults to rfc5424.
41+
3442
| Optional settings
3543
3644
| StructuredData=
3745
Meta information about the syslog message, which can be used for Cloud Based
3846
syslog servers, such as Loggly
39-
|
47+
48+
| UseSysLogStructuredData=
49+
A boolean. Specifies whether to extract SYSLOG_STRUCTURED_DATA= from journal. Defaults to false.
50+
51+
| UseSysLogMsgId=
52+
A boolean. Specifies whether to extract SYSLOG_MSGID= from journal. Defaults to false.
53+
4054
|
4155
4256
EXAMPLES
@@ -58,3 +72,23 @@ EXAMPLES
5872
[Network]
5973
Address=192.168.8.101:514
6074
StructuredData=[1ab456b6-90bb-6578-abcd-5b734584aaaa@41058]
75+
76+
- Example 4. /etc/systemd/netlogd.conf
77+
78+
[Network]
79+
Address=192.168.8.101:514
80+
#Protocol=udp
81+
LogFormat=rfc5424
82+
UseSysLogStructuredData=yes
83+
UseSysLogMsgId=yes
84+
85+
- Use case of UseSysLogStructuredData= and UseSysLogMsgId=
86+
87+
sd_journal_send(
88+
"MESSAGE=%s", "Message to process",
89+
"PRIORITY=%s", "4",
90+
"SYSLOG_FACILITY=%s", "1",
91+
"SYSLOG_MSGID=%s", "1011",
92+
"SYSLOG_STRUCTURED_DATA=%s", R"([exampleSDID@32473 iut="3" eventSource="Application"])",
93+
NULL
94+
);

0 commit comments

Comments
 (0)