Hi all.. I've been working on ELK for about a couple of months now and I've been really liking it apart from the troubelshooting steps. I've just integrated a syslog for trial before going heavily onto production phase. Enabled syslog forwarding from one of my ubuntu VMs to ELK machine. The logs are correctly showing up in ELk but appear with _grokparsefailure tags. (syslog source is 172.31.3.152 and destination ELK is 10.48.69.68)
I ran tcpdump on the ELK machine and got below logs-
21:08:02.580778 IP 172.31.3.152.32986 > 10.48.69.68.1101: Flags [S], seq 3683519550, win 64240, options [mss 1350,sackOK,TS val 4280149539 ecr 0,nop,wscale 7], length 0
E..<1.@.8.......
0ED...M...>...............F...
...#........
21:08:02.580816 IP 10.48.69.68.1101 > 172.31.3.152.32986: Flags [S.], seq 516300327, ack 3683519551, win 28960, options [mss 1460,sackOK,TS val 390860530 ecr 4280149539,nop,wscale 7], length 0
E..<..@.@.;.
0ED.....M.....'...?..q .Y.........
.L.....#....
21:08:02.608012 IP 172.31.3.152.32986 > 10.48.69.68.1101: Flags [.], ack 1, win 502, options [nop,nop,TS val 4280149566 ecr 390860530], length 0
E..41.@.8.......
0ED...M...?...(...........
...>.L..
21:08:02.608074 IP 172.31.3.152.32986 > 10.48.69.68.1101: Flags [P.], seq 1:123, ack 1, win 502, options [nop,nop,TS val 4280149566 ecr 390860530], length 122
E...1.@.8..m....
0ED...M...?...(....7......
...>.L..<38>Aug 30 21:08:02 cd-ubuntu-jh sshd[109055]: Received disconnect from 172.20.219.16 port 64876:11: disconnected by user
21:08:02.608093 IP 10.48.69.68.1101 > 172.31.3.152.32986: Flags [.], ack 123, win 227, options [nop,nop,TS val 390860536 ecr 4280149566], length 0
E..4va@.@..7
0ED.....M.....(.........Q.....
.L.....>
21:08:02.635516 IP 172.31.3.152.32986 > 10.48.69.68.1101: Flags [P.], seq 123:751, ack 1, win 502, options [nop,nop,TS val 4280149593 ecr 390860536], length 628
E...1.@.8..r....
0ED...M.......(....l......
...Y.L..<38>Aug 30 21:08:02 cd-ubuntu-jh sshd[109055]: Disconnected from user cyberuser 172.20.219.16 port 64876
<86>Aug 30 21:08:02 cd-ubuntu-jh sshd[109001]: pam_unix(sshd:session): session closed for user cyberuser
<30>Aug 30 21:08:02 cd-ubuntu-jh systemd[1]: session-1810.scope: Succeeded.
<38>Aug 30 21:08:02 cd-ubuntu-jh systemd-logind[836]: Session 1810 logged out. Waiting for processes to exit.
<38>Aug 30 21:08:02 cd-ubuntu-jh systemd-logind[836]: Removed session 1810.
<46>Aug 30 21:08:02 cd-ubuntu-jh rsyslogd: action 'action-7-builtin:omfwd' resumed (module 'builtin:omfwd') [v8.2001.0 try https://www.rsyslog.com/e/2359 ]
21:08:02.635542 IP 10.48.69.68.1101 > 172.31.3.152.32986: Flags [.], ack 751, win 237, options [nop,nop,TS val 390860543 ecr 4280149593], length 0
E..4vb@.@..6
0ED.....M.....(...-.....Q.....
.L.....Y
21:08:06.306483 IP 172.31.3.152.32986 > 10.48.69.68.1101: Flags [P.], seq 751:922, ack 1, win 502, options [nop,nop,TS val 4280153264 ecr 390860543], length 171
E...1.@.8..:....
0ED...M...-...(.....%.....
.....L..<38>Aug 30 21:08:06 cd-ubuntu-jh sshd[109075]: Accepted publickey for cyberuser from 172.20.219.16 port 64996 ssh2: RSA SHA256:I0iwsS0G0BsGFK9swFHfwSDxmh9PCD9uBiLbVR/2UOE
21:08:06.306506 IP 10.48.69.68.1101 > 172.31.3.152.32986: Flags [.], ack 922, win 246, options [nop,nop,TS val 390861461 ecr 4280153264], length 0
E..4vc@.@..5
0ED.....M.....(.........Q.....
.L......
21:08:06.333437 IP 172.31.3.152.32986 > 10.48.69.68.1101: Flags [P.], seq 922:1213, ack 1, win 502, options [nop,nop,TS val 4280153291 ecr 390861461], length 291
E..W1.@.8.......
0ED...M.......(...........
.....L..<86>Aug 30 21:08:06 cd-ubuntu-jh sshd[109075]: pam_unix(sshd:session): session opened for user cyberuser by (uid=0)
<38>Aug 30 21:08:06 cd-ubuntu-jh systemd-logind[836]: New session 1811 of user cyberuser.
<30>Aug 30 21:08:06 cd-ubuntu-jh systemd[1]: Started Session 1811 of user cyberuser.
21:08:06.333467 IP 10.48.69.68.1101 > 172.31.3.152.32986: Flags [.], ack 1213, win 256, options [nop,nop,TS val 390861468 ecr 4280153291], length 0
E..4vd@.@..4
0ED.....M.....(.........Q.....
.L......
All I am doing is disconnecting from the ssh and logging in back with key-based-auth.
I am not really able to correlate with what is coming through network that I can see on tcpdump because there is alot of additional info coming in on network.
Now the question is how do I correlate and troubleshoot TCPDUMP logs with incoming logs to logstash.
I tried to google but no positive results.
The logfile related to logstash in /var/log doesn't show anything-
[2021-08-30T21:07:58,392][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2021-08-30T21:08:02,620][INFO ][logstash.inputs.syslog ][main][1939d19f40efe997ee4384348ee2605a849d49dd4a440b7435c9c7888aec579a] new connection {:client=>"172.31.3.152:32986"}
my grok for syslog is below-
match => { "message" => "%{SYSLOGTIMESTAMP:time} %{SYSLOGHOST:hostname} %{DATA:program}\[%{POSINT:pid}\]: %{GREEDYDATA:message1}" }
I even tried the config provided in elastic webpage, but again it also gives _grokparsefailure.
Can someone provide the step by step working way of roubleshooting incoming logs (not restricted to only syslog).