[syslog-ng] getting error destination plugin java not found while using mod-java

Pratik Sharma samsunghacks at gmail.com
Sun Jun 24 08:53:24 UTC 2018


Hi Team,

I have a setup of syslog-ng in Centos 7 with jdk 1.8.To use a custom java
program i have installed syslog-ng-java plugin using yum install. I have
added a custom syslog-ng file in conf.d directory.On starting the syslog-ng
service i am reciving error destination java plugin not found.

*ERROR:*

> Jun 24 14:16:01 localhost syslog-ng: Error parsing destination,
> destination plugin java not found in
> /etc/syslog-ng/conf.d/syslog-ng-custom.conf at line 15, column 3:
> Jun 24 14:16:01 localhost syslog-ng: included from
> /etc/syslog-ng/syslog-ng.conf line 68, column 1
> Jun 24 14:16:01 localhost syslog-ng: java(
> Jun 24 14:16:01 localhost syslog-ng: ^^^^
>

Syslog-ng is detecting the java plugin(verified by syslog-ng -V)

*syslog-ng -V:*

> [root at localhost server]# syslog-ng -V
>>>>> syslog-ng 3 (3.14.1)
>>>>> Config version: 3.14
>>>>> Installer-Version: 3.14.1
>>>>> Revision:
>>>>> Compile-Date: Feb 28 2018 07:34:20
>>>>> Module-Directory: //usr/lib64/syslog-ng
>>>>> Module-Path: //usr/lib64/syslog-ng
>>>>> Available-Modules:
>>>>> add-contextual-data,afamqp,affile,afprog,afsocket,afstomp,afuser,appmodel,basicfuncs,cef,confgen,cryptofuncs,csvparser,date,dbparser,disk-buffer,graphite,json-plugin,kvformat,linux-kmsg-format,map-value-pairs,pseudofile,sdjournal,snmptrapd-parser,stardate,syslogformat,system-source,tags-parser,tfgetent,xml,
>>>>> *mod-java*
>>>>> Enable-Debug: off
>>>>> Enable-GProf: off
>>>>> Enable-Memtrace: off
>>>>> Enable-IPv6: on
>>>>> Enable-Spoof-Source: on
>>>>> Enable-TCP-Wrapper: on
>>>>> Enable-Linux-Caps: on
>>>>> Enable-Systemd: on
>>>>>
>>>>
Java Version:

> [root at localhost server]# java -version
> java version "1.8.0_171"
> Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
>



*conf.d/syslog-ng-custom.conf*

source s_apache {
> system();       # Check which OS & collect system logs
>         internal();
> };
>
> destination d_remote {
>   tcp("1.2.3.4" port(514));
> };
> destination d_device_file {
>         file("/var/log/$HOST.$MIN.log");
> };
>
> destination java_to_file{
>   java(
>     class_name("SampleJavaDestination")
>     class_path("/root")
>     option("name", "value")
>     option("filepath", "/var/log/example.txt")
>   );
> };
>
> log {
>   source(s_apache);
>   destination(d_device_file);
>   destination(java_to_file);
>
> };
>



Can someone please tell me what i am missing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20180624/ab728fa6/attachment.html>


More information about the syslog-ng mailing list