Hi
I am trying to grok an event log and it looks like following-
has_log: http dstnat: in:<pppoe-060_jack> out:(none), proto TCP (SYN), 10.0.1.215:45306->162.235.200.2:80, len 60
I have tested the grok for the above in https://grokdebug.herokuapp.com/
and it is ->
in:<%{DATA:uid}> %{GREEDYDATA:whatever} proto %{WORD:Protocol} %{GREEDYDATA:whatever} %{IP:src_ip}:%{INT:src_port}->%{IP:dst_ip}:%{INT:dst_port}
but when i try to filter it inside logstash filter section, it produces grokparsefailure
filter {
grok {
match => {"message", "^in:<%{DATA:uid}>" }
}
}
or whatever
The JSON for the log is
{
"_index": "test-2017.11.18",
"_type": "test",
"_id": "AV_PUSsOjjzJVAmEk2eV",
"_version": 1,
"_score": null,
"_source": {
"FACILITY": "user",
"HOST": "182.48.91.26",
"PRIORITY": "notice",
"type": "test",
"tags": [
"tcpjson",
"_grokparsefailure"
],
"MESSAGE": "has_log: http dstnat: in:<pppoe-028_jack> out:(none), proto TCP (SYN), 10.0.1.154:16611->123.228.107.253:80, len 60",
"DATE": "Nov 18 13:28:09",
"@timestamp": "2017-11-18T13:28:43.990Z",
"HOST_FROM": "172.X.91.26",
"port": 46061,
"@version": "1",
"host": "127.0.0.1",
"TAGS": ".source.s_mikrotik",
"SOURCEIP": "182.48.91.26",
"PROGRAM": "firewall,info",
"LEGACY_MSGHDR": "firewall,info "
},
.........
.........
.........
Looking for a possible solution.
Regards