[Auditbeat] Use a separate netlink socket for control to avoid data congestion.#41207
[Auditbeat] Use a separate netlink socket for control to avoid data congestion.#41207nicholasberlin merged 11 commits intomainfrom
Conversation
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
|
fearful-symmetry
left a comment
There was a problem hiding this comment.
just some small nits
| client, err := libaudit.NewAuditClient(nil) | ||
| defer func() { | ||
| if client != nil { | ||
| client.Close() |
There was a problem hiding this comment.
I assume that if we move the defer statement to after the error check, we don't need the nil check, and we can just do defer client.close()
There was a problem hiding this comment.
Ah, makes sense. Thanks.
| }() | ||
|
|
||
| if err != nil { | ||
| return nil, err |
There was a problem hiding this comment.
nit: can we get a fmt.Errorf() here?
|
Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform) |
|
@fearful-symmetry I re-worked the whole thing, please have another look. Thanks. |
|
@nicholasberlin looks like mostly linter errors from old code, we need to use |
Thanks! Will get into it tomorrow. |
|
@fearful-symmetry ready for review now. Thanks again. |
|
FYI: Searching for this error 'failed to get audit status before adding rules: failed to get audit status ack: error receiving audit reply: no buffer space available' didn't give me any results on Google or Github. The reason being the error message is in a screenshot, not in plaintext. I ended up creating a ticket with Elastic and after a few days of messages I was finally told it would be fixed in 8.16. I then had to dig through the MR's for the 8.16 branch to find anything auditd related. That led me to this PR. Would be good to put the error message in plaintext in the issue/PR/MR so people can actually search for it :) |


Proposed commit message
Use a separate socket for GetStatus.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
Run this program while starting Auditbeat. In a separate terminal run
while true; do ss -f netlink | grep auditbeat; doneYou will see the auditbeat netlink sockets disappear but Auditbeat will continue to run.

Data will stop flowing to Elasticsearch, and an error message will be pushed Elasticsearch, which will be similar to this:
With this PR's patch, the netlink sockets will remain, data will flow to Elasticsearch, and no error message will be pushed.