Hi,
I created a filter for cisco syslog, input source cisco FTD.
All the fields are parsing correctly but I can't rename/remove fields with mutate after I used the kv {} filter.
- Is it possible to use mutate after kv filter, or do I need to use grok patterns then mutate?
- I'm able to remove the "data" field from ES output, is it possible to only remove fields, not change them?
filter {
if [type] == "ling_ftd" {
grok {
match => { "message" => "(?<timestamp>%{MONTH} %{MONTHDAY} %{YEAR} %{TIME}) %{WORD:hosthostname}%{SPACE}%(.*?):%{SPACE} %{GREEDYDATA:data}" }
overwrite => [ "data" ]
}
kv {
source => "data"
field_split => ","
value_split => ":"
}
mutate {
rename => [
"Client", "client",
"DstIP", "destination.ip"
]
remove_field => ['data']
}
}
else if [type] == "trend_dsm" {
grok {
match => { "message" => "%{GREEDYDATA:message}" }
}
}
else if [type] == "meraki" {
grok {
match => { "message" => "%{GREEDYDATA:message}" }
}
}
}
Some sample output
"_version": 1,
"_score": 1,
"_ignored": [
"event.original.keyword",
"message.keyword"
],
"_source": {
" EgressVRF": "test",
" ResponderBytes": "46",
" ApplicationProtocol": "ICMP",
"fields": {
"EventPriority.keyword": [
"Low"
],
" IngressVRF": [
"Global"
],
" InstanceID.keyword": [
"3"
],
.......
],
" DstIP.keyword": [
"10.x.x.x"
.....
],
" ACPolicy": [
"Policy"
],
"EventPriority": [
"Low"
],
"timestamp": [
"May 03 2022 15:03:09"
],
" DstIP": [
"10.x.x.x"
Thanks.