I want to delete all log data from elasticsearch node. I installed ElasticSearch on ubuntu on a Vmware workstation and nothing else. but size of vmware is growing every day. I don't know if reason of this size growing is because of elasticsearch log operation or not? if yes how can i delete all logs?
First make sure the issue is with the log files.
du -sch /var/log/elasticsearch
The above command would be a good place to start with. Next , make sure the logs are in control. /etc/elasticsearch/elasticsearch.yml file has the config for logging.
file:
type: rollingFile
file: ${path.logs}/${cluster.name}.log
maxFileSize: 200000
maxBackupIndex: 10
layout:
type: pattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
The above configuration with maxFileSize and maxBackupIndex should keep a check on this folder size. Decrease the file size if you cant afford it.
If you want to disable logging , change this line in logging.yml
rootLogger: ${es.logger.level}, console, file
to
rootLogger: ${es.logger.level}, console
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With