-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add event.kind and event.category #10357
Conversation
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 ( |
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.
We should have these in the ECS go code ;-)
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 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 |
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.
Is this upper / lower case? Should we use strings.ToLower
here?
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 value has already been ToLower
ed.
@@ -183,110 +185,22 @@ func validateEvent(event *beat.Event) error { | |||
return nil | |||
} | |||
|
|||
func (p *transProcessor) normalizeTransAddr(event common.MapStr) bool { |
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'm a bit suprised how much less logic we now need for this but it's great :-)
Part of #7968
Adds
event.kind = event
andevent.category = network_traffic
to all Packetbeat events.Packetbeat flow events will additional have
event.action = network_flow
(same as Filebeatnetflow).
This also does some cleanup of redundant and unused code that resulted from the ECS
migration.