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