Skip to content

Commit

Permalink
Merged in dev/nikita/pm2_log_rotation_02252021 (pull request elastic#64)
Browse files Browse the repository at this point in the history
Pm2 log rotation

* added pm2 log rotation settings

* fix comment

Approved-by: Gideon Avida
  • Loading branch information
Nikita Dizhur committed Feb 28, 2021
1 parent 6bdb94d commit 9472e26
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions provisioning/provision-dequeue.sh
Expand Up @@ -35,6 +35,13 @@ sudo apt-get install -y nodejs
# TODO: remove once creating appropriate systemd files
sudo npm install -g pm2

# Configure PM2 log rotation
pm2 install pm2-logrotate
pm2 set pm2-logrotate:max_size 5M # compress rotated logs
pm2 set pm2-logrotate:compress true # compress rotated logs
pm2 set pm2-logrotate:retain 3 # keep the last 3 rotated logs, including the current one
pm2 set pm2-logrotate:rotateInterval '0 0 * * 0' # rotate once every week

# Needed to install node package Bunyan
sudo apt-get install make

Expand Down

0 comments on commit 9472e26

Please sign in to comment.