Kibana7.17.10 log rotation


Kibana version-7.17.10
OS - 22.04 ubuntu

I want to log rotation daily basis in kibana for kibana log file
Can you help here?


Can you give a bit more context to your request?
Are you collecting the Kibana log file using Filebeat or Elastic Agent and sending the log lines into Elasticsearch?
Do you want to rotate the index in Elasticsearch daily? Have you looked at using ILM policies for this?

Hi @miltonhultgren

I want to enable the logs file rotation for Kibana logs

which in /var/log/kibana/

Here you go - please notice that you need to alter the service file:
Cfr. How to disable saving Kibana logs to /var/log/kibana

# REQUIRED: disable hardcoded logging in /etc/systemd/system/kibana.service

      type: file
      fileName: /<path>/log/kibana/kibana.log
        type: pattern
      type: rolling-file
      fileName: /<path>/log/kibana/kibana.log
        type: size-limit
        size: 50mb
        type: numeric
        pattern: '-%i'
        max: 7
        type: pattern
    appenders: [default,rolling-file]

Hi @chouben

But I don't want to disable log file that save in /var/log/kibana

I want log in same but daily rotation wise

To alter the config, you need to disable the default config.

So if you want to keep using the path /var/log/kibana, just configure it in kibana.yml with above config.

Hi @chouben

Is there any doc for this?

All info I have is in my first post: 2 threads to similar questions.

Docs seem to indicate there is only default logging:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.