How to set log in kibana?

I installed kibana by default in windows 2008 r2 a few months ago.

However, I did not see log folder under the kibana installation folder.

I found that I could set config file as below in kibana.yml.

logging.dest: stdout

Atfer I set the kibana.yml and restarted the kibana service, I still did not find log folder under the kibana folder.

Is there something wrong with me?

logging.dest: stdout will not create a log file. You can try a value that is a path, such as logging.dest: /var/log/kibana.log.

1 Like

Thanks.

Could you tell me how to set kibana.yml to generate log files by daily?

For example:
d:/kibana/log/kibana.log.20190112.log
d:/kibana/log/kibana.log.20190113.log
d:/kibana/log/kibana.log.20190114.log

That isn't possible via kibana.yml. You could create a bash script that copies the Kibana log file every day at midnight, add the date to the new file name, and clear the original Kibana log file.

While this isn't native to the Elastic stack it is possible with a log rotate script. On Linux you would use logrotate as described here:

In your case on Windows I found this powershell script option on TechNet: Browse code samples | Microsoft Learn

The powershell script doesn't meet exactly the needs you spelled out but could be modified to meet what you're looking for.

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