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

[Filebeat] Replace Suricata/Eve fields with aliases to ECS fields #10377

Merged
merged 10 commits into from
Jan 29, 2019
90 changes: 25 additions & 65 deletions x-pack/filebeat/module/suricata/eve/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,30 @@
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.src_ip",
"target_field": "source.ip",
"type": "string",
"ignore_missing": true
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.src_port",
"target_field": "source.port",
"type": "integer",
"ignore_missing": true
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.dest_ip",
"target_field": "destination.ip",
"type": "string",
"ignore_missing": true
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.dest_port",
"target_field": "destination.port",
"type": "integer",
"ignore_missing": true
}
},
Expand All @@ -47,21 +43,26 @@
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.http.status",
"target_field": "http.response.status_code",
"type": "integer",
"ignore_missing": true
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.http.hostname",
"target_field": "url.domain",
"type": "string",
"target_field": "destination.domain",
"ignore_missing": true
}
},
{
"set": {
"field": "url.domain",
"value": "{{destination.domain}}",
"if": "ctx?.destination?.domain != null"
}
},
{
"grok": {
"field": "suricata.eve.http.url",
Expand All @@ -76,14 +77,6 @@
}
}
},
{
"convert": {
"field": "suricata.eve.http.hostname",
"target_field": "destination.domain",
"type": "string",
"ignore_missing": true
}
},
{
"convert": {
"field": "suricata.eve.http.http_refer",
Copy link
Contributor

Choose a reason for hiding this comment

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

This one's straightforward as well. Any reason why you're not renaming it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, just skipped it by mistake. Good catch

Expand All @@ -93,34 +86,23 @@
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.http.length",
"target_field": "http.response.body.bytes",
"type": "integer",
"ignore_missing": true
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.fileinfo.filename",
"target_field": "file.path",
"type": "string",
"ignore_missing": true
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.fileinfo.size",
"target_field": "file.size",
"type": "integer",
"ignore_missing": true
}
},
{
"convert": {
"field": "suricata.eve.http.http_user_agent",
"target_field": "user_agent_original",
"type": "string",
"ignore_missing": true
}
},
Expand Down Expand Up @@ -149,50 +131,44 @@
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.alert.action",
"target_field": "event.outcome",
"type": "string",
"ignore_missing": true
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.alert.severity",
"target_field": "event.severity",
"type": "integer",
"ignore_missing": true
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.flow.pkts_toclient",
"target_field": "destination.packets",
"type": "integer",
"ignore_missing": true
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.flow.pkts_toserver",
"target_field": "source.packets",
"type": "integer",
"ignore_missing": true
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.flow.bytes_toclient",
"target_field": "destination.bytes",
"type": "integer",
"ignore_missing": true
}
},
{
"convert": {
"rename": {
"field": "suricata.eve.flow.bytes_toserver",
"target_field": "source.bytes",
"type": "integer",
"ignore_missing": true
}
},
Expand Down Expand Up @@ -240,13 +216,13 @@
},
{
"user_agent": {
"field": "user_agent_original",
"field": "suricata.eve.http.http_user_agent",
"ignore_missing": true
}
},
{
"rename": {
"field": "user_agent_original",
"field": "suricata.eve.http.http_user_agent",
"target_field": "user_agent.original",
"ignore_missing": true
}
Expand Down Expand Up @@ -310,29 +286,13 @@
{
"remove": {
"field": [
"suricata.eve.alert.action",
"suricata.eve.alert.severity",
"suricata.eve.app_proto",
"suricata.eve.dest_ip",
"suricata.eve.dest_port",
"suricata.eve.event_type",
"suricata.eve.fileinfo.filename",
"suricata.eve.fileinfo.size",
"suricata.eve.flow.end",
"suricata.eve.flow.start",
"suricata.eve.flow.bytes_toclient",
"suricata.eve.flow.bytes_toserver",
"suricata.eve.flow.pkts_toclient",
"suricata.eve.flow.pkts_toserver",
"suricata.eve.http.hostname",
"suricata.eve.http.http_method",
"suricata.eve.http.http_refer",
"suricata.eve.http.http_user_agent",
"suricata.eve.http.length",
"suricata.eve.http.status",
"suricata.eve.proto",
"suricata.eve.src_ip",
"suricata.eve.src_port",
"suricata.eve.timestamp"
],
"ignore_missing": true
Expand Down