- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
log to graylog2 by adding external jar to classpath
- Labels:
-
Apache NiFi
Created ‎02-17-2017 09:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
in order to log errors and stacktraces to Graylog2 I had the following intention
- manually put the https://github.com/Moocar/logback-gelf as a jar into the nifi dir
- add the jar to the classpath
- change the logback config and add the gelf-appender.
Now, nifi.sh is only loading the bootstrap process that runs nifi. So adding the jar to the cp there is no help. Any idea how I can achieve the effect without touching the nifi source and compile myself?
Thanks for the help!
John
Created ‎02-17-2017 09:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This works actually, by placing the .jar file into the lib and the lib/bootstrap folder and then just applying the changes to the logback.xml like usually.
<appender name="GELF" class="de.siegmar.logbackgelf.GelfUdpAppender"> <graylogHost>ip</graylogHost> <graylogPort>12201</graylogPort> </appender>
I am using de.siegmar:logback-gelf/1.0.3.
Issue resolved for me.
Created ‎02-17-2017 09:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This works actually, by placing the .jar file into the lib and the lib/bootstrap folder and then just applying the changes to the logback.xml like usually.
<appender name="GELF" class="de.siegmar.logbackgelf.GelfUdpAppender"> <graylogHost>ip</graylogHost> <graylogPort>12201</graylogPort> </appender>
I am using de.siegmar:logback-gelf/1.0.3.
Issue resolved for me.
