This project packages modules for Zanata which can be used on JBoss EAP 6. It currently includes some modules which together enable Logstash/JSON formatted log files.
Setting up JSON logging:
-
Extract zanata-jboss-modules-$version.zip to your jboss-eap directory.
-
Configure jboss to use Logstash format by editing the following into your standalone(-full).xml:
<!-- This should replace the previous FILE handler --> <periodic-rotating-file-handler name="FILE" autoflush="true"> <formatter> <named-formatter name="logstash"/> </formatter> <file relative-to="jboss.server.log.dir" path="server.log.json"/> <suffix value=".yyyy-MM-dd"/> <append value="true"/> </periodic-rotating-file-handler> <!-- This should appear after <root-logger>...</root-logger> --> <formatter name="logstash"> <custom-formatter module="org.jboss.logmanager.ext" class="org.jboss.logmanager.ext.formatters.LogstashFormatter"/> </formatter>
To run Logstash (and Elasticsearch) against your logs:
- Download and extract version 1.5.4: https://www.elastic.co/downloads/logstash
- copy in logstash.conf
- edit the path to your json log file
- run logstash: bin/logstash agent --verbose -f logstash.conf --debug
Finally, to run Kibana against Elasticsearch:
- Download and extract kibana 4.1.1: https://www.elastic.co/downloads/kibana
- Run bin/kibana
- Launch http://0.0.0.0:5601/
- Build scripts are under the Mozilla Public License, Version 1.1
- jboss-logmanager-ext is under the Apache License, Version 2.0
- JSON Processing (JSR 353 Reference Implementation) is under CDDL+GPLv2 with classpath exception
Sean Flanigan sflaniga@redhat.com
Module build scripts are based on dcm4chee-arc-cdi's json-jboss-modules by Hesham Elbadawi.