To publish messages from AxoSyslog to Apache Kafka, complete the following steps.
If you want to use the Java-based modules of AxoSyslog (for example, the Elasticsearch, HDFS, or Kafka destinations), you must compile AxoSyslog with Java support.
Download and install the Java Runtime Environment (JRE), 1.7 (or newer). You can use OpenJDK or Oracle JDK, other implementations are not tested.
Install gradle version 2.2.1 or newer.
LD_LIBRARY_PATHto include the
libjvm.sofile, for example:
Note that many platforms have a simplified links for Java libraries. Use the simplified path if available. If you use a startup script to start AxoSyslog set
LD_LIBRARY_PATHin the script as well.
If you are behind an HTTP proxy, create a
modules/java-modules/directory. Set the proxy parameters in the file. For details, see The Gradle User Guide.
Download the latest stable binary release of the Apache Kafka libraries (version 0.9 or newer) from http://kafka.apache.org/downloads.html.
Extract the Apache Kafka libraries into a single directory. If needed, collect the various
.jarfiles into a single directory (for example,
/opt/kafka/lib/) where AxoSyslog can access them. You must specify this directory in the AxoSyslog configuration file.
Check if the following files in the Kafka libraries have the same version number:
slf4j-log4j12-<version-number>.jar. If the version number of these files is different, complete the following steps:
Delete one of the files (for example,
Download a version that matches the version number of the other file (for example, 1.7.6) from the official SLF4J distribution.
Copy the downloaded file into the directory of your Kafka library files (for example,