Kibana7.17.10 log rotation

Hi

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?

Hi!

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

#https://discuss.elastic.co/t/how-to-disable-saving-kibana-logs-to-var-log-kibana/296447
#https://discuss.elastic.co/t/logging-configuration-issues-in-kibana-7-16/295517
# REQUIRED: disable hardcoded logging in /etc/systemd/system/kibana.service

logging:
  appenders:
    file:
      type: file
      fileName: /<path>/log/kibana/kibana.log
      layout:
        type: pattern
    rolling-file:
      type: rolling-file
      fileName: /<path>/log/kibana/kibana.log
      policy:
        type: size-limit
        size: 50mb
      strategy:
        type: numeric
        pattern: '-%i'
        max: 7
      layout:
        type: pattern
  root:
    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.