journald socket buffering for option ForwardToSyslog
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a configuration in which journald is set with ForwardToSyslog=yes
. Quote from the documentation:
If forwarding
to syslog is enabled but nothing reads messages from the socket,
forwarding to syslog has no effect.
I am experiencing a different observation with the following test:
systemctl disable rsyslog
systemctl stop rsyslog
logger "rsyslog is dropped, journald won't forward this message"
systemctl enable rsyslog
systemctl start rsyslog
The result is that rsyslog manages to end up processing the message.
rsyslog has been set without the capability to read the journal database.
My assumption is that socket buffering capabilities are causing rsyslog receive before the time it is running.
If that is the case is it possible to remove this buffering of at least force flushing the socket from bash somehow so rsyslogs history starts together with it?
systemd rsyslog systemd-journald
add a comment |
up vote
0
down vote
favorite
I have a configuration in which journald is set with ForwardToSyslog=yes
. Quote from the documentation:
If forwarding
to syslog is enabled but nothing reads messages from the socket,
forwarding to syslog has no effect.
I am experiencing a different observation with the following test:
systemctl disable rsyslog
systemctl stop rsyslog
logger "rsyslog is dropped, journald won't forward this message"
systemctl enable rsyslog
systemctl start rsyslog
The result is that rsyslog manages to end up processing the message.
rsyslog has been set without the capability to read the journal database.
My assumption is that socket buffering capabilities are causing rsyslog receive before the time it is running.
If that is the case is it possible to remove this buffering of at least force flushing the socket from bash somehow so rsyslogs history starts together with it?
systemd rsyslog systemd-journald
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a configuration in which journald is set with ForwardToSyslog=yes
. Quote from the documentation:
If forwarding
to syslog is enabled but nothing reads messages from the socket,
forwarding to syslog has no effect.
I am experiencing a different observation with the following test:
systemctl disable rsyslog
systemctl stop rsyslog
logger "rsyslog is dropped, journald won't forward this message"
systemctl enable rsyslog
systemctl start rsyslog
The result is that rsyslog manages to end up processing the message.
rsyslog has been set without the capability to read the journal database.
My assumption is that socket buffering capabilities are causing rsyslog receive before the time it is running.
If that is the case is it possible to remove this buffering of at least force flushing the socket from bash somehow so rsyslogs history starts together with it?
systemd rsyslog systemd-journald
I have a configuration in which journald is set with ForwardToSyslog=yes
. Quote from the documentation:
If forwarding
to syslog is enabled but nothing reads messages from the socket,
forwarding to syslog has no effect.
I am experiencing a different observation with the following test:
systemctl disable rsyslog
systemctl stop rsyslog
logger "rsyslog is dropped, journald won't forward this message"
systemctl enable rsyslog
systemctl start rsyslog
The result is that rsyslog manages to end up processing the message.
rsyslog has been set without the capability to read the journal database.
My assumption is that socket buffering capabilities are causing rsyslog receive before the time it is running.
If that is the case is it possible to remove this buffering of at least force flushing the socket from bash somehow so rsyslogs history starts together with it?
systemd rsyslog systemd-journald
systemd rsyslog systemd-journald
asked 2 days ago
TheMeaningfulEngineer
1,60963568
1,60963568
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
One option is to have rsyslog consume the socket directly and not rely on receiving the data form systemd
socket:
# /etc/rsyslog.conf should contain
module(load="imuxsock"
SysSock.Use="on"
SysSock.Name="/run/systemd/journal/syslog")
# cat /lib/systemd/system/rsyslog.service
[Unit]
Description=System Logging Service
Documentation=man:rsyslogd(8)
Documentation=http://www.rsyslog.com/doc/
[Service]
Type=notify
ExecStart=/usr/sbin/rsyslogd -n
StandardOutput=null
Restart=on-failure
[Install]
WantedBy=multi-user.target
This has multiple implications:
- rsyslog wont be automatically started when there are events on the socket (this is what I want to achieve, just being explicit)
- it isn't clear if this conflicts with the rsyslog code which is coupled to systemd socket activation
- it seems to be officially discuraged
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
One option is to have rsyslog consume the socket directly and not rely on receiving the data form systemd
socket:
# /etc/rsyslog.conf should contain
module(load="imuxsock"
SysSock.Use="on"
SysSock.Name="/run/systemd/journal/syslog")
# cat /lib/systemd/system/rsyslog.service
[Unit]
Description=System Logging Service
Documentation=man:rsyslogd(8)
Documentation=http://www.rsyslog.com/doc/
[Service]
Type=notify
ExecStart=/usr/sbin/rsyslogd -n
StandardOutput=null
Restart=on-failure
[Install]
WantedBy=multi-user.target
This has multiple implications:
- rsyslog wont be automatically started when there are events on the socket (this is what I want to achieve, just being explicit)
- it isn't clear if this conflicts with the rsyslog code which is coupled to systemd socket activation
- it seems to be officially discuraged
add a comment |
up vote
1
down vote
One option is to have rsyslog consume the socket directly and not rely on receiving the data form systemd
socket:
# /etc/rsyslog.conf should contain
module(load="imuxsock"
SysSock.Use="on"
SysSock.Name="/run/systemd/journal/syslog")
# cat /lib/systemd/system/rsyslog.service
[Unit]
Description=System Logging Service
Documentation=man:rsyslogd(8)
Documentation=http://www.rsyslog.com/doc/
[Service]
Type=notify
ExecStart=/usr/sbin/rsyslogd -n
StandardOutput=null
Restart=on-failure
[Install]
WantedBy=multi-user.target
This has multiple implications:
- rsyslog wont be automatically started when there are events on the socket (this is what I want to achieve, just being explicit)
- it isn't clear if this conflicts with the rsyslog code which is coupled to systemd socket activation
- it seems to be officially discuraged
add a comment |
up vote
1
down vote
up vote
1
down vote
One option is to have rsyslog consume the socket directly and not rely on receiving the data form systemd
socket:
# /etc/rsyslog.conf should contain
module(load="imuxsock"
SysSock.Use="on"
SysSock.Name="/run/systemd/journal/syslog")
# cat /lib/systemd/system/rsyslog.service
[Unit]
Description=System Logging Service
Documentation=man:rsyslogd(8)
Documentation=http://www.rsyslog.com/doc/
[Service]
Type=notify
ExecStart=/usr/sbin/rsyslogd -n
StandardOutput=null
Restart=on-failure
[Install]
WantedBy=multi-user.target
This has multiple implications:
- rsyslog wont be automatically started when there are events on the socket (this is what I want to achieve, just being explicit)
- it isn't clear if this conflicts with the rsyslog code which is coupled to systemd socket activation
- it seems to be officially discuraged
One option is to have rsyslog consume the socket directly and not rely on receiving the data form systemd
socket:
# /etc/rsyslog.conf should contain
module(load="imuxsock"
SysSock.Use="on"
SysSock.Name="/run/systemd/journal/syslog")
# cat /lib/systemd/system/rsyslog.service
[Unit]
Description=System Logging Service
Documentation=man:rsyslogd(8)
Documentation=http://www.rsyslog.com/doc/
[Service]
Type=notify
ExecStart=/usr/sbin/rsyslogd -n
StandardOutput=null
Restart=on-failure
[Install]
WantedBy=multi-user.target
This has multiple implications:
- rsyslog wont be automatically started when there are events on the socket (this is what I want to achieve, just being explicit)
- it isn't clear if this conflicts with the rsyslog code which is coupled to systemd socket activation
- it seems to be officially discuraged
edited 2 days ago
answered 2 days ago
TheMeaningfulEngineer
1,60963568
1,60963568
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482136%2fjournald-socket-buffering-for-option-forwardtosyslog%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown