MiNiFi Java Agent Administration
Also available as:
PDF

StatusLogger

class name: org.apache.nifi.minifi.bootstrap.status.reporters.StatusLogger

The Periodic Status Reporter logs the results of the query to the logs. By default it is logged to the minifi-bootstrap.log but you can modify logback.xml to log to an alternate file and location.

Option

Description

nifi.minifi.status.reporter.log.query

The FlowStatus query to run.

nifi.minifi.status.reporter.log.level

The log level at which to log the status. Available options are "TRACE", "DEBUG", "INFO", "WARN" and "ERROR".

nifi.minifi.status.reporter.log.period

The delay (in milliseconds) between each query.

Example bootstrap.conf configuration:

# The FlowStatus query to submit to the MiNiFi instance
nifi.minifi.status.reporter.log.query=instance:health,bulletins
# The log level at which the status will be logged
nifi.minifi.status.reporter.log.level=INFO
# The period (in milliseconds) at which to log the status
nifi.minifi.status.reporter.log.period=60000

Example logback.xml configuration to output the status to its own rolling log file:

<appender name="STATUS_LOG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
 <file>logs/minifi-status.log</file>
 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
 <!--
 For daily rollover, use 'user_%d.log'.
 For hourly rollover, use 'user_%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/minifi-status_%d.log</fileNamePattern>
 <!-- keep 5 log files worth of history -->
 <maxHistory>5</maxHistory>
 </rollingPolicy>
 <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
 <pattern>%date %level [%thread] %logger{40} %msg%n</pattern>
 </encoder>
</appender>

<logger name="org.apache.nifi.minifi.bootstrap.status.reporters.StatusLogger" level="INFO" additivity="false">
 <appender-ref ref="STATUS_LOG_FILE" />
</logger>