-
Notifications
You must be signed in to change notification settings - Fork 912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Systemd unit: Do not send falco alerts to /var/log/messages by default #1697
Conversation
Signed-off-by: Domenico Chirabino <[email protected]>
Welcome @chirabino! It looks like this is your first PR to falcosecurity/falco 🎉 |
/milestone 0.30.0 |
LGTM label has been added. Git tree hash: a0ff8fb9f25322faa0233cf087984753f2d3c2cb
|
I can kind of agree that falco logs shouldn't go to /var/log/messages by default. But with this change, where are falco alerts logged when run under systemd? |
Short answer: alerts will be still sent to syslog since the Lines 154 to 155 in 7c98d00
TL;DR Note: It's been a long time since I've experienced this problem, so that I may have forgotten something. Also, I may be missing something, so make sure my reasons are correct 😸 |
Sounds good, as long as there's some output channel still enabled. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chirabino, leogr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sorry for necrobumping; does anyone remember why the patch was only applied to rpm service, and not debian too? |
IIRC correctly, either the Debian default was different (so the issue was not present there) or we just forgot it 😸 |
Signed-off-by: Domenico Chirabino [email protected]
What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area engine
What this PR does:
This PR set
StandardOutput
tonull
in the systemd unit configurationfalco.service
.Why we need it
After the migration from initd to systemd (#1448), when falco is installed via systemd it writes to
/var/log/messages
by default.The problem is not present when manually running Falco (without using systemd).
This is due to the default value in the systemd configuration:
DefaultStandardOutput=journal
(which falco inherits), so that Falco standard output is redirected to/var/log/messages
(see https://manpages.debian.org/wheezy/systemd/systemd.conf.5.en.html).At the time of writing a workaround is to disable
stdout_output
:I think that falco should not write to system logs by default. Moreover, asking users to disable
stdout_output
(enabled by default) may be misleading and confusing (ie. I wantstdout_output
enabled so I can start falco manually for debugging or for testing rules)Which issue(s) this PR fixes:
Fixes #1673
Special notes for your reviewer:
Thanks for your time :)
/cc @leogr
Does this PR introduce a user-facing change?: