We didn’t have the time to implement ELK stack for Kafka logs so if a issue appears it should be done the old fashion way.
To that purpose, here are two commands that should help you surfing the logs in an easy manner.
First of all, there is the grep command that should show you the hole line and number.
A simple example looks like
grep -nw "2019-06-03" server.log
This should show you all the lines with date 03.06 from the log of the Kafka broker. The idea is that you can not use it with the standard construct cat server.log | grep -nw “[string]”. It must be used in this specific format.
Once you found the line number (and it could look just like 95138:java.lang.OutOfMemoryError: Java heap space there is the less command that we can use.
less +95138 server.log
And that should give you the line.
Thanks all folks!