logagent-js icon indicating copy to clipboard operation
logagent-js copied to clipboard

Add Java Garbage Collection parser

Open otisg opened this issue 6 years ago • 4 comments

Note that different JVMs have different GC log patterns. We could pick a few from the most popular JVMs/versions.

otisg avatar Apr 12 '19 13:04 otisg

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

prog8 avatar Apr 12 '19 13:04 prog8

Here's a sample G1 GC log from OpenJDK 11. Running Elasticsearch 7.0, though this shouldn't matter. gc.log

radu-gheorghe avatar Apr 15 '19 06:04 radu-gheorghe

@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 ?

megastef avatar Apr 15 '19 13:04 megastef

Will do. And get back to you.

radu-gheorghe avatar Apr 16 '19 04:04 radu-gheorghe