Kibana Logs rotation

Adding more detail, since this is not documented very well yet.

First, set the pid.file option in kibana.yml to have Kibana create a process ID file. For example, to set it as "pid.log", add:

pid.file: "pid.log"

If you're going to use logrotate, add an entry to logrotate.conf, such as:

/var/log/kibana {
    missingok
    notifempty
    sharedscripts
    postrotate
    /bin/kill -HUP $(cat /usr/share/kibana/pid.log 2>/dev/null) 2>/dev/null
    endscript
}

Note that I haven't tried this myself, so let me know if it works, or what you did to get it working.

4 Likes