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

Handle PIDs in messages and message prefixes #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sigv
Copy link

@sigv sigv commented Sep 17, 2019

The provided example includes a message using the default log format. This includes a PID next to the process name such as haproxy[1234]: which does not currently get properly parsed. Additionally, some extractors already work for messages with prefixes (such as datetime being added there) while others do not, therefore this PR adds consistency by dropping the ^ line-start requirement.

Field 1 on the default HAProxy log format is set as
`process_name '[' pid ']:'` which is also displayed in the example
message in README. The existing rules do not allow for the PID
brackets. This commit properly resolves them while also maintaining
backwards compatibility for a PID-less log format.
In case there is a prefix applied to the message, the `^haproxy`
condition match would fail. There are already some of the extractors
which have dropped the line-start requirement from their regular
expressions. This commit removes the requirement from all the
extractors for consistency and input flexibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant