Skip to content
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

Cherry-pick #16116 to 7.x: [Journalbeat] Improve parsing of syslog.pid in journalbeat to strip the username when present #16213

Merged
merged 1 commit into from
Feb 10, 2020

Conversation

blakerouse
Copy link
Contributor

Cherry-pick of PR #16116 to 7.x branch. Original message:

What does this PR do?

Fixes an issue where syslog.pid is reported as an integer followed by the username.

Why is it important?

In some cases journald reports the syslog.pid with the user that started the pid following it. This strips the username and only sends the pid in the event.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • [ ]

How to test this PR locally

I was unable to reproduce this issue with journald on Ubuntu 19.10. But was able to reproduce the failure using a unit test, so best way to test is just by running the unit tests.

Related issues

Use cases

Screenshots

Logs

…he username when present (elastic#16116)

* Improve parsing of syslog.pid in journalbeat to strip the username in pid when present.

* Add entry to changelog with pull ID.

* Improve the comment on the username strip.

(cherry picked from commit 6a7dbd6)
@blakerouse blakerouse merged commit 7149bf5 into elastic:7.x Feb 10, 2020
@blakerouse blakerouse deleted the backport_16116_7.x branch February 10, 2020 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants