From 9586ed4e7b16c5b6d054acfa90e17cb76906f279 Mon Sep 17 00:00:00 2001 From: pdiogoantunes Date: Tue, 3 Apr 2018 09:29:43 +0200 Subject: [PATCH] logstash ajout --- HowtoElasticsearch.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/HowtoElasticsearch.md b/HowtoElasticsearch.md index b531763f..abab7207 100644 --- a/HowtoElasticsearch.md +++ b/HowtoElasticsearch.md @@ -332,6 +332,14 @@ En l'indiquant dans une crontab elle sera exécutée quand vous le souhaitez, ex 10 1 * * * /path/to/rotate_elasticsearch_logs.sh ~~~ +Pour logstash : + +~~~ +LOG_DIR=/var/log/logstash/ +USER=logstash +MAX_AGE=365 +find ${LOG_DIR} -type f -user ${USER} -name "logstash-*-????-??-??.log" -exec gzip --best {} \; +~~~ ## cluster