Skip to content

Conversation

@richm
Copy link
Contributor

@richm richm commented Aug 1, 2019

https://bugzilla.redhat.com/show_bug.cgi?id=1734951
When mmnormalize fails to parse, it will create the fields originalmsg
and unparsed-data in the record:
https://github.com/rsyslog/liblognorm/blob/master/src/pdag.c#L1680
In this case, we want to remove the fields from the record, just after
where the mmnormalize occurred.
This also ensures that the timestamp we use to generate the index
name is normalized i.e. make sure it is in the form YYYY-MM-DD. If
using MERGE_JSON_LOG=true, the user may have already added a
@timestamp field to the record which may be in some odd format.

@openshift-ci-robot
Copy link

@richm: This pull request references a valid Bugzilla bug. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Bug 1734951: rsyslog with MERGE_JSON_LOG=true does not handle non-JSON data

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 1, 2019
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 1, 2019
@richm richm requested a review from nhosoi August 1, 2019 01:56
@richm richm added kind/bug Categorizes issue or PR as related to a bug. release/4.2 labels Aug 1, 2019
@richm
Copy link
Contributor Author

richm commented Aug 1, 2019

/retest

…N data

https://bugzilla.redhat.com/show_bug.cgi?id=1734951
When mmnormalize fails to parse, it will create the fields `originalmsg`
and `unparsed-data` in the record:
https://github.com/rsyslog/liblognorm/blob/master/src/pdag.c#L1680
In this case, we want to remove the fields from the record, just after
where the mmnormalize occurred.
This also ensures that the timestamp we use to generate the index
name is normalized i.e. make sure it is in the form `YYYY-MM-DD`.  If
using `MERGE_JSON_LOG=true`, the user may have already added a
`@timestamp` field to the record which may be in some odd format.
@richm richm force-pushed the bz173495-rsyslog-with-MERGE_JSON_LOG=true-does-not-handle-non-JSON-data branch from ebf6553 to 6d961b3 Compare August 1, 2019 22:42
@richm
Copy link
Contributor Author

richm commented Aug 1, 2019

/retest

3 similar comments
@richm
Copy link
Contributor Author

richm commented Aug 1, 2019

/retest

@richm
Copy link
Contributor Author

richm commented Aug 1, 2019

/retest

@richm
Copy link
Contributor Author

richm commented Aug 1, 2019

/retest

@nhosoi
Copy link
Contributor

nhosoi commented Aug 1, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 1, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nhosoi, richm

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit d633aa0 into openshift:master Aug 2, 2019
@openshift-ci-robot
Copy link

@richm: All pull requests linked via external trackers have merged. The Bugzilla bug has been moved to the MODIFIED state.

In response to this:

Bug 1734951: rsyslog with MERGE_JSON_LOG=true does not handle non-JSON data

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@richm richm deleted the bz173495-rsyslog-with-MERGE_JSON_LOG=true-does-not-handle-non-JSON-data branch August 2, 2019 01:48
pmoogi-redhat pushed a commit to pmoogi-redhat/cluster-logging-operator that referenced this pull request Apr 26, 2022
…GE_JSON_LOG=true-does-not-handle-non-JSON-data

Bug 1734951: rsyslog with MERGE_JSON_LOG=true does not handle non-JSON data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release/4.2 size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants