-
Notifications
You must be signed in to change notification settings - Fork 158
LOG-6860: Support Splunk Metadata keys in ClusterLogForwarder #2999
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
Conversation
@vparfonov: This pull request references LOG-6860 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.8.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
/lgtm |
payload := string(spec.Splunk.PayloadKey) | ||
for _, v := range spec.Splunk.IndexedFields { | ||
if !strings.HasPrefix(string(v), payload) { | ||
results = append(results, fmt.Sprintf("Indexed field: %s not part of payload: %s", v, payload)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we trying to restrict they payload field from being part of indexed fields? If so then the error should read that it can not or is not allowed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indexed fields can't be outside of a given payload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this to be a reasonable restriction even though it is the behavior of the encoder. Use the audit event example from the feature request where they are indexing annotations but the "event"/payload field comes from a sibling node in the original message. We should be able to copy the fields in question to the "root" of the message so the encoder picks them up while setting the payload to something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you are right, this checks are overhead and not clear. I will remove this
/hold |
/test functional-target |
1 similar comment
/test functional-target |
/test functional-target |
7 similar comments
/test functional-target |
/test functional-target |
/test functional-target |
/test functional-target |
/test functional-target |
/test functional-target |
/test functional-target |
/test e2e-target |
// A dynamic value is encased in single curly brackets `{}` and MUST end with a static fallback value separated with `||`. | ||
// Static values can only contain alphanumeric characters along with dashes, underscores, dots and forward slashes. | ||
// If not specified will be detected according to .log_source and .log_type value. | ||
// Details see in: docs/features/logforwarding/outputs/splunk-forwarding.adoc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will have to be a full link URL to be useful. Ideally it would be to the released branch instead of 'master' but that will have to do until we release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, i will change this after we will release
payload := string(spec.Splunk.PayloadKey) | ||
for _, v := range spec.Splunk.IndexedFields { | ||
if !strings.HasPrefix(string(v), payload) { | ||
results = append(results, fmt.Sprintf("Indexed field: %s not part of payload: %s", v, payload)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this to be a reasonable restriction even though it is the behavior of the encoder. Use the audit event example from the feature request where they are indexing annotations but the "event"/payload field comes from a sibling node in the original message. We should be able to copy the fields in question to the "root" of the message so the encoder picks them up while setting the payload to something else.
internal/generator/vector/output/splunk/splunk_sink_with_indexed_fields.toml
Show resolved
Hide resolved
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jcantrill, vparfonov 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 |
/lgtm |
/retest |
Signed-off-by: Vitalii Parfonov <[email protected]>
/hold cancel |
/lgtm |
9c6f260
into
openshift:master
@vparfonov: cannot checkout In response to this:
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-sigs/prow repository. |
Description
This PR addressed to extend the
ClusterLogForwarder
to supportSplunk
metadata fields
when forwarding logsso that we enable better integration with
Splunk
./cc @Clee2691 @cahartma
/assign @jcantrill
/cherry-pick
Links