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

Add event.kind and event.category #10357

Merged
merged 2 commits into from
Jan 28, 2019

Conversation

andrewkroh
Copy link
Member

Part of #7968

Adds event.kind = event and event.category = network_traffic to all Packetbeat events.
Packetbeat flow events will additional have event.action = network_flow (same as Filebeat
netflow).

This also does some cleanup of redundant and unused code that resulted from the ECS
migration.

Part of elastic#7968

Adds event.kind = event and event.category = network_traffic to all Packetbeat events.
Packetbeat flow events will additional have event.action = network_flow (same as Filebeat
netflow).

This also does some cleanup of redundant and unused code that resulted from the ECS
migration.
@@ -35,6 +35,13 @@ import (
// event at publish time.
const FieldsKey = "_packetbeat"

// Network direction values.
const (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have these in the ECS go code ;-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. 👍

@@ -560,6 +559,7 @@ func (http *httpPlugin) newTransaction(requ, resp *message) beat.Event {
if http.sendRequest {
fields["request"] = string(http.makeRawMessage(requ))
}
fields["method"] = httpFields.RequestMethod
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this upper / lower case? Should we use strings.ToLower here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value has already been ToLowered.

@@ -183,110 +185,22 @@ func validateEvent(event *beat.Event) error {
return nil
}

func (p *transProcessor) normalizeTransAddr(event common.MapStr) bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit suprised how much less logic we now need for this but it's great :-)

@andrewkroh andrewkroh merged commit 4e78750 into elastic:master Jan 28, 2019
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