Support Questions
Find answers, ask questions, and share your expertise

NIFI : logback.xml SYSLOG

Highlighted

NIFI : logback.xml SYSLOG

Explorer

hi all,

Do you know how to test logback.xml to send log to rsyslog ? I've restarted nifi node

With this configuration i see anything go out from my host.

    <appender name="loghost" class="ch.qos.logback.classic.net.SyslogAppender">
        <syslogHost>syslog.server01.fr</syslogHost>
        <port>1514</port>
        <facility>INFO</facility>
        <suffixPattern>%date %level [%thread] %logger{40} %msg%n</suffixPattern>
    </appender>

    <root level="INFO">
        <appender-ref ref="loghost"/>
    </root>

thanks

6 REPLIES 6

Re: NIFI : logback.xml SYSLOG

Please check output of the nifi-bootstrap and nifi-app log files. It will tell if there were any errors in the logging configuration. In addition, it's not required to restart NiFi when one changes logback.xml - updates will be picked up and reloaded automatically every 30 seconds.

Highlighted

Re: NIFI : logback.xml SYSLOG

Explorer

No any errors found in logs files

Highlighted

Re: NIFI : logback.xml SYSLOG

Your facility string is incorrect. A list of permissible values is available here: http://logback.qos.ch/manual/appenders.html Additionally check the syslog receiver port on the other end (default is 514).

Highlighted

Re: NIFI : logback.xml SYSLOG

Explorer

@Andrew Grande : for the port, my rsyslog has a custom port 1514

Thanks @Andrew Grande you are right "info" facility doesn't exists.

Highlighted

Re: NIFI : logback.xml SYSLOG

Explorer

there is something strange with logback facility

				
					The facility is meant to identify 
						the source of a message.

					The facility option must be set
					to one of the strings KERN, USER, MAIL, DAEMON, AUTH,
					SYSLOG, LPR, NEWS, UUCP, CRON, AUTHPRIV, FTP, NTP, AUDIT,
					ALERT, CLOCK, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4,
					LOCAL5, LOCAL6, LOCAL7. Case is not important.

the nifi has WARN and ERROR but logback didn't has how intercept WARN and ERROR with logback ?

nifi-app_2016-12-26_16.0.log:2016-12-26 16:59:44,490 ERROR [Timer-Driven Process Thread-3] o.a.nifi.processors.standard.SplitText SplitText[id=77273814-e6ed-1596-bac6-55c0410b05a9] SplitText[id=77273814-e6ed-1596-bac6-55c0410b05a9] failed to process session due to java.lang.OutOfMemoryError: Java heap space: java.lang.OutOfMemoryError: Java heap space
nifi-app_2016-12-26_16.0.log:java.lang.OutOfMemoryError: Java heap space
nifi-app_2016-12-26_16.0.log:2016-12-26 16:59:44,491 WARN [Timer-Driven Process Thread-3] o.a.n.c.t.ContinuallyRunProcessorTask Administratively Yielding SplitText[id=77273814-e6ed-1596-bac6-55c0410b05a9] due to uncaught Exception: java.lang.OutOfMemoryError: Java heap space
nifi-app_2016-12-26_16.0.log:java.lang.OutOfMemoryError: Java heap space
Highlighted

Re: NIFI : logback.xml SYSLOG

Is the original problem with the 'facility' string solved? Can you accept an answer?

From your logs, now you are running out of JVM memory. Increase the heap size as per https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#bootstrap_properties