gcjfrlog is Java agent to gather GC information via JFR Event Sreaming and to post them as JSON document via HTTP.
JDK 14 or later
$ mvn package
Post events to Elasticsearch
$ java -javaagent:/path/to/gcjfrlog.jar=uri=http://localhost:9200/gcjfrlog-%y-%m/%h,label=app ...
Set path to gcjfrlog-<version>.jar
to -javaagent
$ java -javaagent:/path/to/gcjfrlog.jar=<option> ...
You need to escape double-quote.
$ jcmd <PID> JVMTI.agent_load \"/path/tp/gcjfrlog.jar=<option>\"
uri
mandatory option- URI to push
label
- label field would be set if this value is set
connect_timeout
- Connection timeout in millis
request_timeout
- HTTP request timeout in millis
You can use format strings in uri
.
%h
- hostname
%l
- label
%y
- year (yyyy)
%m
- month (mm)
%d
- day (dd)
jdk.GCPhasePause
jdk.PromotionFailed
jdk.EvacuationFailed
jdk.ConcurrentModeFailure
jdk.MetaspaceOOM
jdk.GCHeapSummary
jdk.MetaspaceSummary
jdk.GarbageCollection
The GNU Lesser General Public License, version 3.0