Skip to main content
springtide_
Silver ⭐️
May 3, 2022
Solved

nifi logback.xml persistance

Hi,

 

I am unfamiliar with Cloudera and tasked with enforcing a log retention policy on all services, currently working in NIFI. Our NIFIis part of CFM-2.2.3.2.

I have changes to make to logback.xml, but they are overwritten when a new process directory is created. What is the source of the config.zip that is downloaded to create the process directory and how can I rebuild config.zip to include a copy of logback.xml with my changes? I couldn't find this in the docs I had access to, nor clearly in the cloudera logs I examined. 

 

Many thanks in advance!

DianaTorres
Community Manager
May 6, 2022

@springtide_ Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks!

Regards, Diana Torres, Senior Community Moderator

5 replies

gtorres
Silver ⭐️⭐️⭐️
Silver ⭐️⭐️⭐️
May 3, 2022

logback.xml configuration must be edited with Cloudera Manager, You need to go to NiFi Service > Configuration and search for logback.xml. These property will preserve the custom logback.xml changes and will be added to the logback.xml created during process start  

Translate
bbahamondes
Gold ⭐️
Gold ⭐️
May 3, 2022

Hello,

 

You need to change this on Cloudera Manager > NiFi > Configs > Search for "logback_safety_valve"

Paste the complete contents of the logback.xml in logback_safety_valve

Translate
springtide_
Silver ⭐️
May 3, 2022

Thanks for the direction.

Is there anyway to do this via command line/api call?

I'm maintaining code for deployment of clusters including this service to be deployed by other people. I would like this set "out of the box" for our config by way of a shell script or ansible

Translate
gtorres
Silver ⭐️⭐️⭐️
Silver ⭐️⭐️⭐️
May 3, 2022

In the following link you can find how to call Cloudera Manager API to modify Safety valves:
https://docs.cloudera.com/cdp-private-cloud-base/latest/configuring-clusters/topics/cm-api-set-snippet.html

 

Translate
DianaTorres
Community Manager
Community Manager
May 6, 2022

@springtide_ Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks!

Translate
Regards, Diana Torres, Senior Community Moderator