According to the above Settings, when metricbeat restarts, why does a new log file (metricbeat-yyyMMdd-1.ndjson) be generated? I want to generate a log file in the form of metricbeat-yyyMMdd.ndjson every day
example:
metricbeat-20241025.ndjson
metricbeat-20241026.ndjson
metricbeat-20241027.ndjson
Thank you very much for that answer.
To ensure daily log rotation without creating additional files on startup, adjust the interval setting in your Metricbeat configuration to 1d. This will trigger a new log file to be created every day at the same time. By setting rotateonstartup to False, you prevent the creation of extra log files when Metricbeat restarts.
Thank you for your answers.
metribeat.version: 8.15
logging.files.interval: 1d
test result:
Exiting: error initializing logging: time: unknown unit "d" in duration "1d" accessing 'logging.files.interval' (source:'/etc/metricbeat/metricbeat.yml')
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.