# Kibana7.17.10 log rotation

**URL:** <https://discuss.elastic.co/t/kibana7-17-10-log-rotation/342313>\
**Category:** Kibana\
**Created:** [September 5, 2023, 7:56am UTC](https://discuss.elastic.co/t/kibana7-17-10-log-rotation/342313 "2023-09-05T07:56:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ekta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ekta/32/55987_2.png) [@Ekta](https://discuss.elastic.co/u/Ekta)\
**Post date:** [September 5, 2023, 7:56am UTC](https://discuss.elastic.co/t/kibana7-17-10-log-rotation/342313/1 "2023-09-05T07:56:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![miltonhultgren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miltonhultgren/32/100401_2.png) [@miltonhultgren](https://discuss.elastic.co/u/miltonhultgren)\
**Post date:** [September 5, 2023, 9:37am UTC](https://discuss.elastic.co/t/kibana7-17-10-log-rotation/342313/2 "2023-09-05T09:37:40Z")

</div>

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](https://www.elastic.co/guide/en/elasticsearch/reference/8.6/index-lifecycle-management.html#index-lifecycle-management) for this?

---

<div class="post-metadata">

**Author:** ![Ekta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ekta/32/55987_2.png) [@Ekta](https://discuss.elastic.co/u/Ekta)\
**Post date:** [September 5, 2023, 11:26am UTC](https://discuss.elastic.co/t/kibana7-17-10-log-rotation/342313/3 "2023-09-05T11:26:44Z")

</div>

Hi @miltonhultgren

I want to enable the logs file rotation for Kibana logs

which in /var/log/kibana/

---

<div class="post-metadata">

**Author:** ![chouben](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chouben](https://discuss.elastic.co/u/chouben)\
**Post date:** [September 5, 2023, 11:47am UTC](https://discuss.elastic.co/t/kibana7-17-10-log-rotation/342313/4 "2023-09-05T11:47:02Z")

</div>

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)

```auto
#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]

```

---

<div class="post-metadata">

**Author:** ![Ekta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ekta/32/55987_2.png) [@Ekta](https://discuss.elastic.co/u/Ekta)\
**Post date:** [September 5, 2023, 12:27pm UTC](https://discuss.elastic.co/t/kibana7-17-10-log-rotation/342313/5 "2023-09-05T12:27:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chouben](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chouben](https://discuss.elastic.co/u/chouben)\
**Post date:** [September 5, 2023, 12:58pm UTC](https://discuss.elastic.co/t/kibana7-17-10-log-rotation/342313/6 "2023-09-05T12:58:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ekta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ekta/32/55987_2.png) [@Ekta](https://discuss.elastic.co/u/Ekta)\
**Post date:** [September 6, 2023, 11:28am UTC](https://discuss.elastic.co/t/kibana7-17-10-log-rotation/342313/7 "2023-09-06T11:28:24Z")

</div>

Hi @chouben

Is there any doc for this?

---

<div class="post-metadata">

**Author:** ![chouben](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chouben](https://discuss.elastic.co/u/chouben)\
**Post date:** [September 6, 2023, 1:54pm UTC](https://discuss.elastic.co/t/kibana7-17-10-log-rotation/342313/8 "2023-09-06T13:54:47Z")

</div>

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

Docs seem to indicate there is only default logging:

> **[Logs settings in Kibana | Kibana Guide \[8.9\] | Elastic](https://www.elastic.co/guide/en/kibana/current/logs-ui-settings-kb.html)**

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 4, 2023, 1:55pm UTC](https://discuss.elastic.co/t/kibana7-17-10-log-rotation/342313/9 "2023-10-04T13:55:41Z")

</div>

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