juhaszviktor / esdestination Goto Github PK
View Code? Open in Web Editor NEWElasticSearch Destination for syslog-ng
License: GNU General Public License v2.0
ElasticSearch Destination for syslog-ng
License: GNU General Public License v2.0
f/next_step☠ gradle -PsyslogDepsDir=/usr/local/lib/syslog-ng build --info
Starting Build
Settings evaluated using empty settings script.
Projects loaded. Root project using build file '/home/fwernli/git/ESDestination/build.gradle'.
Included projects: [root project 'ESDestination']
Evaluating root project 'ESDestination' using build file '/home/fwernli/git/ESDestination/build.gradle'.
All projects evaluated.
Selected primary task 'build'
Tasks to be executed: [task ':compileJava', task ':processResources', task ':classes', task ':jar', task ':assemble', task ':compileTestJava', task ':processTestResources', task ':testClasses', task ':test', task ':check', task ':build']
:compileJava
Executing task ':compileJava' due to:
Input file /usr/local/lib/syslog-ng/SyslogNg.jar for task ':compileJava' has changed.
Compiling with JDK 6 Java compiler API.
:processResources
Skipping task ':processResources' as it has no source files.
:processResources UP-TO-DATE
:classes
Skipping task ':classes' as it has no actions.
:jar
Skipping task ':jar' as it is up-to-date.
Skipping task ':jar' as it is up-to-date
:jar UP-TO-DATE
:assemble
Skipping task ':assemble' as it has no actions.
:assemble UP-TO-DATE
:compileTestJava
Executing task ':compileTestJava' due to:
Input file /usr/local/lib/syslog-ng/SyslogNg.jar for task ':compileTestJava' has changed.
Compiling with JDK 6 Java compiler API.
:processTestResources
Skipping task ':processTestResources' as it has no source files.
:processTestResources UP-TO-DATE
:testClasses
Skipping task ':testClasses' as it has no actions.
:test
Executing task ':test' due to:
No history is available for task ':test'.
com.google.common.io.ByteSource$ByteArrayByteSource cannot be cast to com.google.common.io.InputSupplier
java.lang.ClassCastException: com.google.common.io.ByteSource$ByteArrayByteSource cannot be cast to com.google.common.io.InputSupplier
at com.google.common.io.ByteStreams.asInputSupplier(ByteStreams.java:891)
at com.google.common.io.ByteStreams.newInputStreamSupplier(ByteStreams.java:68)
at org.gradle.process.internal.child.ApplicationClassesInSystemClassLoaderWorkerFactory.prepareJavaCommand(ApplicationClassesInSystemClassLoaderWorkerFactory.java:99)
at org.gradle.process.internal.DefaultWorkerProcessFactory$DefaultWorkerProcessBuilder.build(DefaultWorkerProcessFactory.java:105)
at org.gradle.api.internal.tasks.testing.worker.ForkingTestClassProcessor.processTestClass(ForkingTestClassProcessor.java:62)
at org.gradle.api.internal.tasks.testing.processors.RestartEveryNTestClassProcessor.processTestClass(RestartEveryNTestClassProcessor.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.FailureHandlingDispatch.dispatch(FailureHandlingDispatch.java:29)
at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:132)
at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:72)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
com.google.common.io.ByteSource$ByteArrayByteSource cannot be cast to com.google.common.io.InputSupplier
java.lang.ClassCastException: com.google.common.io.ByteSource$ByteArrayByteSource cannot be cast to com.google.common.io.InputSupplier
at com.google.common.io.ByteStreams.asInputSupplier(ByteStreams.java:891)
at com.google.common.io.ByteStreams.newInputStreamSupplier(ByteStreams.java:68)
at org.gradle.process.internal.child.ApplicationClassesInSystemClassLoaderWorkerFactory.prepareJavaCommand(ApplicationClassesInSystemClassLoaderWorkerFactory.java:99)
at org.gradle.process.internal.DefaultWorkerProcessFactory$DefaultWorkerProcessBuilder.build(DefaultWorkerProcessFactory.java:105)
at org.gradle.api.internal.tasks.testing.worker.ForkingTestClassProcessor.processTestClass(ForkingTestClassProcessor.java:62)
at org.gradle.api.internal.tasks.testing.processors.RestartEveryNTestClassProcessor.processTestClass(RestartEveryNTestClassProcessor.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.FailureHandlingDispatch.dispatch(FailureHandlingDispatch.java:29)
at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:132)
at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:72)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
com.google.common.io.ByteSource$ByteArrayByteSource cannot be cast to com.google.common.io.InputSupplier
java.lang.ClassCastException: com.google.common.io.ByteSource$ByteArrayByteSource cannot be cast to com.google.common.io.InputSupplier
at com.google.common.io.ByteStreams.asInputSupplier(ByteStreams.java:891)
at com.google.common.io.ByteStreams.newInputStreamSupplier(ByteStreams.java:68)
at org.gradle.process.internal.child.ApplicationClassesInSystemClassLoaderWorkerFactory.prepareJavaCommand(ApplicationClassesInSystemClassLoaderWorkerFactory.java:99)
at org.gradle.process.internal.DefaultWorkerProcessFactory$DefaultWorkerProcessBuilder.build(DefaultWorkerProcessFactory.java:105)
at org.gradle.api.internal.tasks.testing.worker.ForkingTestClassProcessor.processTestClass(ForkingTestClassProcessor.java:62)
at org.gradle.api.internal.tasks.testing.processors.RestartEveryNTestClassProcessor.processTestClass(RestartEveryNTestClassProcessor.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.FailureHandlingDispatch.dispatch(FailureHandlingDispatch.java:29)
at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:132)
at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:72)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
com.google.common.io.ByteSource$ByteArrayByteSource cannot be cast to com.google.common.io.InputSupplier
java.lang.ClassCastException: com.google.common.io.ByteSource$ByteArrayByteSource cannot be cast to com.google.common.io.InputSupplier
at com.google.common.io.ByteStreams.asInputSupplier(ByteStreams.java:891)
at com.google.common.io.ByteStreams.newInputStreamSupplier(ByteStreams.java:68)
at org.gradle.process.internal.child.ApplicationClassesInSystemClassLoaderWorkerFactory.prepareJavaCommand(ApplicationClassesInSystemClassLoaderWorkerFactory.java:99)
at org.gradle.process.internal.DefaultWorkerProcessFactory$DefaultWorkerProcessBuilder.build(DefaultWorkerProcessFactory.java:105)
at org.gradle.api.internal.tasks.testing.worker.ForkingTestClassProcessor.processTestClass(ForkingTestClassProcessor.java:62)
at org.gradle.api.internal.tasks.testing.processors.RestartEveryNTestClassProcessor.processTestClass(RestartEveryNTestClassProcessor.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.FailureHandlingDispatch.dispatch(FailureHandlingDispatch.java:29)
at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:132)
at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:72)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
com.google.common.io.ByteSource$ByteArrayByteSource cannot be cast to com.google.common.io.InputSupplier
java.lang.ClassCastException: com.google.common.io.ByteSource$ByteArrayByteSource cannot be cast to com.google.common.io.InputSupplier
at com.google.common.io.ByteStreams.asInputSupplier(ByteStreams.java:891)
at com.google.common.io.ByteStreams.newInputStreamSupplier(ByteStreams.java:68)
at org.gradle.process.internal.child.ApplicationClassesInSystemClassLoaderWorkerFactory.prepareJavaCommand(ApplicationClassesInSystemClassLoaderWorkerFactory.java:99)
at org.gradle.process.internal.DefaultWorkerProcessFactory$DefaultWorkerProcessBuilder.build(DefaultWorkerProcessFactory.java:105)
at org.gradle.api.internal.tasks.testing.worker.ForkingTestClassProcessor.processTestClass(ForkingTestClassProcessor.java:62)
at org.gradle.api.internal.tasks.testing.processors.RestartEveryNTestClassProcessor.processTestClass(RestartEveryNTestClassProcessor.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.FailureHandlingDispatch.dispatch(FailureHandlingDispatch.java:29)
at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:132)
at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:72)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':test'.
> com.google.common.io.ByteSource$ByteArrayByteSource cannot be cast to com.google.common.io.InputSupplier
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 6.923 secs
I get the following runtime error:
Error: org/syslog_ng/StructuredLogDestination
java.lang.NoClassDefFoundError: org/syslog_ng/StructuredLogDestination
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at org.syslog_ng.SyslogNgClassLoader.loadClass(SyslogNgClassLoader.java:57)
Caused by: java.lang.ClassNotFoundException: org.syslog_ng.StructuredLogDestination
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 14 more
[2015-06-30T15:50:01.461126] Can't find class; class_name='org.syslog_ng.elasticsearch.ElasticSearchDestination'
[2015-06-30T15:50:01.461145] Error initializing message pipeline;
Hi. I'm using Peter's copr repository rpms:
$ rpm -q syslog-ng
syslog-ng-3.6.4-1.el7.centos.x86_64
$ rpm -q syslog-ng-incubator
syslog-ng-incubator-0.4.1-4.el7.centos.x86_64
Here's the java config:
block destination elasticsearch_java (
server()
cluster()
index("${__es_index:-syslog_ng}-${YEAR}.${MONTH}.${DAY}")
type("${__es_type:-syslog_ng}")
client_mode("transport")
port(9300)
flush_limit(1)
template("$(format-json -s all-nv-pairs -x __* -x tmp.* -x SOURCE -x PROGRAM -x MESSAGE -x PID -x HOST_FROM -x HOST -x LEGACY_MSGHDR -p tags=$TAGS -p rcptid=$RCPTID -p @timestamp=$ISODATE --rekey .classifier.* --add-prefix pdb --rekey .SDATA.* --replace-prefix .SDATA=.sdata --rekey .sdata.smurf.* --shift 7 --rekey .* --shift 1)\n")
log_fifo_size(10000)
)
{
java(
log_fifo_size(`log_fifo_size`)
class_path("/usr/lib64/syslog-ng/ESDestination.jar:/usr/share/elasticsearch/lib/*.jar")
class_name("org.syslog_ng.elasticsearch.ElasticSearchDestination")
option("flush_limit" "`flush_limit`")
option("port" "`port`")
option("message_template" `template`)
option("cluster" `cluster`)
option("index" `index`)
option("type" `type`)
option("server" `server`)
option("client_mode" `client_mode`)
);
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.