Member since
03-31-2021
2
Posts
0
Kudos Received
0
Solutions
05-09-2021
04:47 PM
NiFi 1.13.2 OpenJDK 1.8.0_292 (64-bit) <appender name="APP_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${org.apache.nifi.bootstrap.config.log.dir}/nifi-app.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--
For daily rollover, use 'app_%d.log'.
For hourly rollover, use 'app_%d{yyyy-MM-dd_HH}.log'.
To GZIP rolled files, replace '.log' with '.log.gz'.
To ZIP rolled files, replace '.log' with '.log.zip'.
-->
<fileNamePattern>${org.apache.nifi.bootstrap.config.log.dir}/nifi-app_%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern>
<maxFileSize>100MB</maxFileSize>
<!-- keep 30 log files worth of history -->
<maxHistory>30</maxHistory>
<totalSizeCap>50GB</totalSizeCap>
<!-- archive removal will be executed on appender start up -->
<cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy>
<immediateFlush>true</immediateFlush>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %level [%thread] %logger{40} %msg%n</pattern>
</encoder>
</appender> From what I understand from the config, logs will have 30hours of history and 50GB overall size. But the logs we had and experience more than once already, was 200GB of logs. This causes the system to crash. Please help how to properly configure nifi to limit the log size and I've tried to do it by myself with no luck. Thank you!
... View more
Labels:
- Labels:
-
Apache NiFi