Skip to content

Commit

Permalink
Handle event_type:stats as event.kind:metric
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkroh committed Feb 23, 2019
1 parent ff5eaf6 commit f3b893d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
20 changes: 3 additions & 17 deletions x-pack/filebeat/module/suricata/eve/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,23 +256,9 @@
}
},
{
"set": {
"if": "ctx.suricata?.eve?.event_type == \"alert\"",
"field": "event.kind",
"value": "alert"
}
},
{
"set": {
"if": "ctx.suricata?.eve?.event_type != \"alert\"",
"field": "event.kind",
"value": "event"
}
},
{
"set": {
"field": "event.category",
"value": "network_traffic"
"script": {
"lang": "painless",
"source": "def t = ctx.suricata?.eve?.event_type; if (t == \"stats\") {\n ctx['event']['kind'] = \"metric\";\n} else if (t == \"alert\") {\n ctx['event']['kind'] = \"alert\";\n ctx['event']['category'] = \"network_traffic\";\n} else {\n ctx['event']['kind'] = \"event\";\n ctx['event']['category'] = \"network_traffic\";\n}"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,9 @@
{
"@timestamp": "2018-07-05T19:51:23.009Z",
"ecs.version": "1.0.0-beta2",
"event.category": "network_traffic",
"event.dataset": "suricata.eve",
"event.end": "2018-07-05T19:51:23.009Z",
"event.kind": "event",
"event.kind": "metric",
"event.module": "suricata",
"fileset.name": "eve",
"input.type": "log",
Expand Down

0 comments on commit f3b893d

Please sign in to comment.