From 6447aea2583eec08e44f40b3ad8371d15965f25c Mon Sep 17 00:00:00 2001 From: Mike Thomsen Date: Sat, 8 Jul 2023 22:05:02 -0400 Subject: [PATCH] NIFI-11788 Modified APP_FILE logback configuration to have better cleanup NIFI-11788 Standardized Logback maximum settings - Set MiNiFi maxHistory to 10 and totalSizeCap to 10MB - Set NiFi maxHistory to 30 and totalSizeCap to 3GB except for deprecation log - Set Stateless maxHistory to 30 and totalSizeCap to 3GB - Set Registry maxHistory to 30 and totalSizeCap to 3GB NIFI-11788 Increased MiNiFi maxFileSize to 10MB and cap to 100MB This closes #7465. Coauthored by David Handermann and Mike Thomsen Signed-off-by: Joseph Witt --- .../src/main/resources/conf/logback.xml | 22 +++++++--- .../src/main/resources/conf/logback.xml | 44 ++++++++++++++++--- .../main/resources/conf/stateless-logback.xml | 7 ++- .../src/main/resources/conf/logback.xml | 29 +++++++++--- .../main/resources/conf/stateless-logback.xml | 7 ++- 5 files changed, 88 insertions(+), 21 deletions(-) diff --git a/minifi/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/conf/logback.xml b/minifi/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/conf/logback.xml index 2b470d7180..72fd36cd94 100644 --- a/minifi/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/conf/logback.xml +++ b/minifi/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/conf/logback.xml @@ -29,12 +29,14 @@ To ZIP rolled files, replace '.log' with '.log.zip'. --> ${org.apache.nifi.minifi.bootstrap.config.log.dir}/${org.apache.nifi.minifi.bootstrap.config.log.app.file.name}_%d{yyyy-MM-dd_HH}.%i.${org.apache.nifi.minifi.bootstrap.config.log.app.file.extension}.gz - + + 10MB + 10 - - 1MB - - 10MB + + 100MB + + true true @@ -52,8 +54,14 @@ To ZIP rolled files, replace '.log' with '.log.zip'. --> ${org.apache.nifi.minifi.bootstrap.config.log.dir}/${org.apache.nifi.minifi.bootstrap.config.log.bootstrap.file.name}_%d.${org.apache.nifi.minifi.bootstrap.config.log.bootstrap.file.extension}.gz - - 5 + + 10MB + + 10 + + 100MB + + true %date %level [%thread] %logger{40} %msg%n diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/logback.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/logback.xml index b13218d62f..3e9c1aa8e3 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/logback.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/logback.xml @@ -31,9 +31,14 @@ To ZIP rolled files, replace '.log' with '.log.zip'. --> ${org.apache.nifi.bootstrap.config.log.dir}/nifi-app_%d{yyyy-MM-dd_HH}.%i.log + 100MB - + 30 + + 3GB + + true true @@ -51,8 +56,14 @@ To ZIP rolled files, replace '.log' with '.log.zip'. --> ${org.apache.nifi.bootstrap.config.log.dir}/nifi-user_%d.log - + + 100MB + 30 + + 3GB + + true %date %level [%thread] %logger{40} %msg%n @@ -63,7 +74,14 @@ ${org.apache.nifi.bootstrap.config.log.dir}/nifi-request.log ${org.apache.nifi.bootstrap.config.log.dir}/nifi-request_%d.log + + 100MB + 30 + + 3GB + + true %msg%n @@ -80,8 +98,14 @@ To ZIP rolled files, replace '.log' with '.log.zip'. --> ${org.apache.nifi.bootstrap.config.log.dir}/nifi-bootstrap_%d.log - - 5 + + 100MB + + 30 + + 3GB + + true %date %level [%thread] %logger{40} %msg%n @@ -92,9 +116,14 @@ ${org.apache.nifi.bootstrap.config.log.dir}/nifi-deprecation.log ${org.apache.nifi.bootstrap.config.log.dir}/nifi-deprecation_%d.%i.log + 10MB + 10 + 100MB + + true %date %level [%thread] %logger %msg%n @@ -114,9 +143,14 @@ To ZIP rolled files, replace '.log' with '.log.zip'. --> ${org.apache.nifi.bootstrap.config.log.dir}/nifi-app-${logFileSuffix}_%d{yyyy-MM-dd_HH}.%i.log + 100MB - + 30 + + 3GB + + true true diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/stateless-logback.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/stateless-logback.xml index 15b9663b4d..a11eecfa47 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/stateless-logback.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/conf/stateless-logback.xml @@ -29,9 +29,14 @@ To ZIP rolled files, replace '.log' with '.log.zip'. --> ${org.apache.nifi.bootstrap.config.log.dir}/nifi-stateless_%d{yyyy-MM-dd_HH}.%i.log + 100MB - + 30 + + 3GB + + true true diff --git a/nifi-registry/nifi-registry-core/nifi-registry-resources/src/main/resources/conf/logback.xml b/nifi-registry/nifi-registry-core/nifi-registry-resources/src/main/resources/conf/logback.xml index 36ffa92ff9..ee61682772 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-resources/src/main/resources/conf/logback.xml +++ b/nifi-registry/nifi-registry-core/nifi-registry-resources/src/main/resources/conf/logback.xml @@ -28,11 +28,14 @@ To ZIP rolled files, replace '.log' with '.log.zip'. --> ${org.apache.nifi.registry.bootstrap.config.log.dir}/nifi-registry-app_%d{yyyy-MM-dd_HH}.%i.log + 100MB - + 30 - - 10GB + + 3GB + + true true @@ -50,8 +53,14 @@ To ZIP rolled files, replace '.log' with '.log.zip'. --> ${org.apache.nifi.registry.bootstrap.config.log.dir}/nifi-registry-bootstrap_%d.log - - 5 + + 100MB + + 30 + + 3GB + + true %date %level [%thread] %logger{40} %msg%n @@ -68,8 +77,14 @@ To ZIP rolled files, replace '.log' with '.log.zip'. --> ${org.apache.nifi.registry.bootstrap.config.log.dir}/nifi-registry-event_%d.log - - 5 + + 100MB + + 30 + + 3GB + + true %date ## %msg%n diff --git a/nifi-stateless/nifi-stateless-resources/src/main/resources/conf/stateless-logback.xml b/nifi-stateless/nifi-stateless-resources/src/main/resources/conf/stateless-logback.xml index 095f32a61b..fa2399c318 100644 --- a/nifi-stateless/nifi-stateless-resources/src/main/resources/conf/stateless-logback.xml +++ b/nifi-stateless/nifi-stateless-resources/src/main/resources/conf/stateless-logback.xml @@ -29,9 +29,14 @@ To ZIP rolled files, replace '.log' with '.log.zip'. --> ${org.apache.nifi.bootstrap.config.log.dir}/nifi-stateless_%d{yyyy-MM-dd_HH}.%i.log + 100MB - + 30 + + 3GB + + true true