Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to prevent nifi-app logs from filling my drive.

Highlighted

How to prevent nifi-app logs from filling my drive.

New Contributor

This past weekend I had an issue and my nifi-app logs filed up my drive. I have address the issue but I am trying to find out how I can configure nifi to rotate the nifi-app files so it dose not file up my disk space again. Thank you

8 REPLIES 8
Highlighted

Re: How to prevent nifi-app logs from filling my drive.

Hi @Andre Labbe

You can configure log rotation and retention in the logback configuration of NiFi. Please start by reading these ressources to get started:

Highlighted

Re: How to prevent nifi-app logs from filling my drive.

New Contributor

Hi @Abdelkrim Hadjidj

These links were very informative. After reading these and doing some testing I think I have found what I need but it is not available in the version that I have.

The option I am looking for is totalSizeCap. If I am reading the notes correctly is available in logback 1.1.8, and I am running Nifi 1.1.1 witch uses logback 1.1.3. Would you happen to know what version of logback is used by the newest version of Nifi?

Highlighted

Re: How to prevent nifi-app logs from filling my drive.

Hi @Andre Labbe

That's good news. Following NIFI-3694, it looks like logback has been updated to 1.2.3 on NiFi 1.2.

Highlighted

Re: How to prevent nifi-app logs from filling my drive.

@Andre Labbe If you found that this answer addressed your question, please take a moment to click "Accept" below.

Highlighted

Re: How to prevent nifi-app logs from filling my drive.

New Contributor

Did you get any feedback? How did you solved it?

Highlighted

Re: How to prevent nifi-app logs from filling my drive.

We have tried to change these settings but no joy. I "ruined" the logback xml and nifi did not start. So the file is being read. However, any setting change I make does not take affect (nifi-app.log).

Stock setup should rotate the logs every hour. We have not seen this behavior. Also, I changed the <maxFileSize> to 2MB but that doesn't help either.

Anyone have the same experience? Seems odd. We are on Windows 10.

Re: How to prevent nifi-app logs from filling my drive.

Explorer

<file>${org.apache.nifi.bootstrap.config.log.dir}/nifi-app.log</file>

Until 1.7.0 this string in logback.xml was commented. Uncomment it and it will be ok

Highlighted

Re: How to prevent nifi-app logs from filling my drive.

Rats. I am using 1.7.0. It is already uncommented.

Don't have an account?
Coming from Hortonworks? Activate your account here