Xenology
Xenology

Reputation: 2452

How to turn off Elasticsearch JVM Garbage Collection logs

After settling into our ELK stack log aggregation setup over the past few months, I am noticing that a significant percentage of the logs we are persisting are from elastic search garbage collection.

While I have tried to ignore these logs specifically in filebeat configuration I seem to have been unsuccessful. Is there a way via configuration to turn this logging off until I need it? Or a way to ignore these log files that I am not currently using?

Upvotes: 0

Views: 3588

Answers (1)

Mahdi Yusefi
Mahdi Yusefi

Reputation: 521

I put this quote from the official document of elasticsearch.

By default, Elasticsearch enables garbage collection (GC) logs. These are configured in jvm.options and output to the same default location as the Elasticsearch logs. The default configuration rotates the logs every 64 MB and can consume up to 2 GB of disk space.

You can reconfigure JVM logging using the command line options described in JEP 158: Unified JVM Logging. Unless you change the default jvm.options file directly, the Elasticsearch default configuration is applied in addition to your own settings. To disable the default configuration, first disable logging by supplying the -Xlog:disable option, then supply your own command line options. This disables all JVM logging, so be sure to review the available options and enable everything that you require.

For more details: GC logging settings

Upvotes: 3

Related Questions