Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

CM/CFM: ControllerStatusReportingTask

avatar
New Contributor

Hi,

 

I am using CM 6.3.1 with CFM. As I am exploring NIFI -> ControllerStatusReportingTask and I wanted to log the output to a log file. I realised the logback.xml is auto generated by Cloudera Manager, how am I going to add customize logback configuration for the ControllerStatusReportingTask into the logback.xml?

 

From the CM, there is a NIFI Node XML Override (logback_safety_valve). Should I use this?

It seems that, the input require a complete logback XML file. Just wanted to be sure of the approach as I will be upgrading on my production system.

 

1 ACCEPTED SOLUTION

avatar
Super Mentor

@paygb 

 

You are absolutely correct, the Cloudera Manager configuration property within NiFi configurations fro logback.xml does require you to input the entire logbck.xml and then add your modifications.

MattWho_0-1632765059020.png

 

Adding a new logger for the ControllerStatusReportingTask would require adding a logger like this:

<logger name="org.apache.nifi.controller.ControllerStatusReportingTask" level="DEBUG"/>

You can add this logger in line along with other loggers already in the logback.xml

The result would be all logging from this class at a DEBUG level and below would go in to the nifi-app.log.

You could optionally add an additional appender (NiFi has three existing appender now for the nifi-app.log, nifi-user.log and nifi-bootstrap.log files).  You can copy and modify one of those and the your logger would need to look like this:

  <logger name="org.apache.nifi.controller.ControllerStatusReportingTask" level="DEBUG" additivity="false">
    <appender-ref ref="NEW_APPENDER"/>
  </logger>

 

If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post.

Thank you,

Matt

View solution in original post

1 REPLY 1

avatar
Super Mentor

@paygb 

 

You are absolutely correct, the Cloudera Manager configuration property within NiFi configurations fro logback.xml does require you to input the entire logbck.xml and then add your modifications.

MattWho_0-1632765059020.png

 

Adding a new logger for the ControllerStatusReportingTask would require adding a logger like this:

<logger name="org.apache.nifi.controller.ControllerStatusReportingTask" level="DEBUG"/>

You can add this logger in line along with other loggers already in the logback.xml

The result would be all logging from this class at a DEBUG level and below would go in to the nifi-app.log.

You could optionally add an additional appender (NiFi has three existing appender now for the nifi-app.log, nifi-user.log and nifi-bootstrap.log files).  You can copy and modify one of those and the your logger would need to look like this:

  <logger name="org.apache.nifi.controller.ControllerStatusReportingTask" level="DEBUG" additivity="false">
    <appender-ref ref="NEW_APPENDER"/>
  </logger>

 

If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post.

Thank you,

Matt