https://github.com/yasuenag/gcjfrlog
JFR event shipper for GC
https://github.com/yasuenag/gcjfrlog
gc java jfr logshipper
Last synced: about 1 year ago
JSON representation
JFR event shipper for GC
- Host: GitHub
- URL: https://github.com/yasuenag/gcjfrlog
- Owner: YaSuenag
- License: lgpl-3.0
- Created: 2020-12-08T12:10:59.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-04-06T13:08:14.000Z (about 3 years ago)
- Last Synced: 2024-06-11T16:17:24.290Z (about 2 years ago)
- Topics: gc, java, jfr, logshipper
- Language: Java
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gcjfrlog

===================
gcjfrlog is Java agent to gather GC information via JFR Event Sreaming and to post them as JSON document via HTTP.
# Requirements
JDK 14 or later
# How to build
```
$ mvn package
```
# How to use
## Examples
Post events to Elasticsearch
```
$ java -javaagent:/path/to/gcjfrlog.jar=uri=http://localhost:9200/gcjfrlog-%y-%m/%h,label=app ...
```
## Start agent
### Start log shipping since process start
Set path to `gcjfrlog-.jar` to `-javaagent`
```
$ java -javaagent:/path/to/gcjfrlog.jar= ...
```
### Attach gcjfrlog to existing process
You need to escape double-quote.
```
$ jcmd 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
## Format strings
You can use format strings in `uri`.
* `%h`
* hostname
* `%l`
* label
* `%y`
* year (yyyy)
* `%m`
* month (mm)
* `%d`
* day (dd)
# JFR events which are handled
* `jdk.GCPhasePause`
* `jdk.PromotionFailed`
* `jdk.EvacuationFailed`
* `jdk.ConcurrentModeFailure`
* `jdk.MetaspaceOOM`
* `jdk.GCHeapSummary`
* `jdk.MetaspaceSummary`
* `jdk.GarbageCollection`
# License
The GNU Lesser General Public License, version 3.0