Open otisg opened 5 years ago
JVM GC logs format depends not only on JVM version but also JVM settings used to start JVM.
We can look here to get inspirations: https://github.com/chewiebug/GCViewer/tree/develop/src/main/java/com/tagtraum/perf/gcviewer/imp
An example for G1 logs parser: https://github.com/chewiebug/GCViewer/blob/develop/src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderSun1_6_0G1.java
Notice that extracting valuable numeric data is not trivial but hopefully doable with simple JS regexps. @megastef could you take a quick look at the example of parser to see how much effort would it require on LA side to prepare regular expressions which can handle it?
This one also looks interesting. Maybe can be useful: https://github.com/Mortinke/logstash-pattern/blob/master/logstash/etc/logstash/patterns/gc
Here's a sample G1 GC log from OpenJDK 11. Running Elasticsearch 7.0, though this shouldn't matter. gc.log
@radu-gheorghe would you like to try grok patterns https://github.com/Mortinke/logstash-pattern/blob/master/logstash/etc/logstash/patterns/gc together with Logagent grok input filter ?
Will do. And get back to you.
Note that different JVMs have different GC log patterns. We could pick a few from the most popular JVMs/versions.