Hi, We have several existing Java based web apps (tomcat), and we're using logback for logging locally. Now I'm trying to get the log entries sent using UDP to a Graylog2 server, but I'm not having any luck. I have tomcat logs showing up in Graylog2 using logstash (ex. Server startup in 32674 ms), so I'm confident Graylog2 is working. I've tried several different handlers and used their example logback.xml:
- https://github.com/mp911de/logstash-gelf - https://github.com/Moocar/logback-gelf - https://github.com/pukkaone/logback-gelf Example logback.xml (logstash): <!DOCTYPE configuration> <configuration> <contextName>test</contextName> <jmxConfigurator/> <appender name="gelf" class="biz.paluch.logging.gelf.logback.GelfLogbackAppender"> <host>udp:10.0.x.x</host> <port>12201</port> <version>1.1</version> <facility>java-test</facility> <extractStackTrace>true</extractStackTrace> <filterStackTrace>true</filterStackTrace> <mdcProfiling>true</mdcProfiling> <timestampPattern>yyyy-MM-dd HH:mm:ss,SSSS</timestampPattern> <maximumMessageSize>8192</maximumMessageSize> <!-- This are static fields --> <additionalFields>fieldName1=fieldValue1,fieldName2=fieldValue2</additionalFields> <!-- Optional: Specify field types --> <additionalFieldTypes>fieldName1=String,fieldName2=Double,fieldName3=Long</additionalFieldTypes> <!-- This are fields using MDC --> <mdcFields>mdcField1,mdcField2</mdcFields> <dynamicMdcFields>mdc.*,(mdc|MDC)fields</dynamicMdcFields> <includeFullMdc>true</includeFullMdc> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>TRACE</level> </filter> </appender> <root level="TRACE"> <appender-ref ref="gelf" /> </root> </configuration> Is there a simple example application (or web app) that works that I can download and try? I'd like to get working source code so that I can verify my setup and then figure out what I'm doing wrong. Thanks. -- You received this message because you are subscribed to the Google Groups "Graylog Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/graylog2/744c52e5-2783-44b6-a799-3c9953a36942%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
