Hi Stephane,
In the conf directory of your nifi install there is a logback.xml file that
needs to be edited. This configuration file controls the internal logging
done by nifi. For each of the appenders you will see an XML elements that
reference the "logs" directory. For example here is the config for the
app.log
<appender name="APP_FILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
* <file>logs/nifi-app.log</file> <--- This should be changed*
<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--
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>./logs/nifi-app_%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern>
<--This should be changed*
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!-- keep 30 log files worth of history -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder
class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %level [%thread] %logger{40} %msg%n</pattern>
<immediateFlush>true</immediateFlush>
</encoder>
</appender>
You would want to change the references above in to your attached volume. I
have marked them with bold above. In the logback config file you will see
two other appenders as well, these same changes should be done there as
well.
Thanks,
Andrew
On Mon, Jun 6, 2016 at 6:56 AM, Stéphane Maarek <[email protected]>
wrote:
> Hi,
>
> I'm running NiFi on a t1.micro in AWS. I have attached a 100GB EBS volume
> at /mnt/xvdf and all the NiFi databases are there. I have a problem though.
> It seems that NiFi keeps an internal log and I can't change the position of
> it, so it's quickly clogging my t1.micro disk. See below. How can I improve
> / change that? And what's the "work" folder for?
>
> [ec2-user@ ~]$ du -s *
> 5271404 nifi
> [ec2-user@ ~]$ cd nifi
> [ec2-user@ nifi]$ du -s *
> 28 bin
> 756 conf
> 8412 docs
> 427468 lib
> 64 LICENSE
> 4331244 logs
> 44 NOTICE
> 8 README
> 144 state
> 503232 work
>
>
> Thanks!
> Stephane
>
--
Thanks,
Andrew
Subscribe to my book: Streaming Data <http://manning.com/psaltis>
<https://www.linkedin.com/pub/andrew-psaltis/1/17b/306>
twiiter: @itmdata <http://twitter.com/intent/user?screen_name=itmdata>