-
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
Convert Packetbeat Flows to ECS #9121
Conversation
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.
Could you also update the ECS migration file?
"start": "2018-11-15T14:41:21.000Z", | ||
"type": "flow" | ||
}, | ||
"flow": { |
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 like the flow prefix.
I wonder if we should have a second file besides |
This has been updated based on the proposed changes in elastic/ecs#179. |
29676e0
to
5fee60a
Compare
@andrewkroh Should in your PR description above |
d8db504
to
ace9b93
Compare
Good catch. I fixed it in the description and the commit message. I squashed the existing commits and rebased on master. |
ace9b93
to
6e87f68
Compare
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 assume this PR is not planned to be backported?
We should also discuss migration compatiblity of packetbeat to 7.0 /ECS.
Pinging @elastic/secops |
@ruflin None of these fields changes are being back-ported. |
@andrewkroh As the above migrated fields are all 1-1 mappings, should we introduce aliases for it in 6.x? |
@ruflin Good idea. I'll added a checklist item to the parent issue for adding alias. I think it would make sense to look at the whole list of changes made for 7.0 then open a single PR to add all the alias we desire for Packetbeat to the 6.x branch. |
6e87f68
to
8c2fc44
Compare
Updating schema to commit 349406f59e5c7c80a20c9f213370d2601b73f040. Some fields were removed so I added placeholder fields with TODO statements. Those fields can be removed after modules using the fields are updated accordingly.
The makes changes to the event format generated by Packetbeat's flow feature. Field Changes - type -> event.type - transport -> network.transport - flow_id -> flow.id - final -> flow.final - vlan -> flow.vlan - start_time -> event.start - last_time -> event.end - source.stats.net_bytes_total -> source.bytes - source.stats.net_packets_total -> source.packets - dest.stats.net_bytes_total -> destination.bytes - dest.stats.net_packets_total -> destination.packets Added - network.bytes - network.packets - event.duration Frames with multiple levels of encapsulation like 802.1q with "Q-in-Q" will result in certain fields becoming an array with the outer most metadata being listed first (e.g. source.ip, destination.ip, flow.vlan). Any dashboards associated with flows are not updated in this change. Part of elastic#7968.
25514e9
to
9b8c4d7
Compare
@ruflin I rebased this since it’s been in existence for a while. Can you please take another look? What changed?
|
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.
LGTM. @webmat Perhaps you could also have a look?
@@ -34,22 +34,22 @@ def test_mysql_flow(self): | |||
pprint(objs) |
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.
What is this new pcap file just above (can't comment there)? Is that intentional in this PR?
@@ -97,6 +118,125 @@ | |||
different values which are then freely searchable. If multiple | |||
messages exist, they can be combined into one message. | |||
|
|||
- name: client |
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 not fully convinced we should add the full ecs fields yml to each Beat or only add the fields which are used by more then one Beat. We can still clean this up later.
type: keyword | ||
description: > | ||
Unique ID to describe the event. | ||
example: 8a4f500d | ||
phase: 1 | ||
|
||
- name: kind |
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.
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.
The Packetbeat flow changes are not being back-ported to 6.x.
* Update ECS fields Updating schema to commit 349406f59e5c7c80a20c9f213370d2601b73f040. Some fields were removed so I added placeholder fields with TODO statements. Those fields can be removed after modules using the fields are updated accordingly. * Convert Packetbeat Flows to ECS The makes changes to the event format generated by Packetbeat's flow feature. Field Changes - type -> event.type - transport -> network.transport - flow_id -> flow.id - final -> flow.final - vlan -> flow.vlan - start_time -> event.start - last_time -> event.end - source.stats.net_bytes_total -> source.bytes - source.stats.net_packets_total -> source.packets - dest.stats.net_bytes_total -> destination.bytes - dest.stats.net_packets_total -> destination.packets Added - network.bytes - network.packets - event.duration Frames with multiple levels of encapsulation like 802.1q with "Q-in-Q" will result in certain fields becoming an array with the outer most metadata being listed first (e.g. source.ip, destination.ip, flow.vlan). Any dashboards associated with flows are not updated in this change. Part of elastic#7968.
The makes changes to the event format generated by Packetbeat's flow feature.
Sample Event
This is part of #7968.
Field Changes
Added
Frames with multiple levels of encapsulation like 802.1q with "Q-in-Q" will result in certain fields becoming an array with the outer most metadata being listed first (e.g. source.ip, destination.ip, flow.vlan).
Any dashboards associated with flows are not updated in this change.