syslog-ng destination plugin elasticsearch2 not found

I have Linux Mint 19. syslog-ng –version:

options {     threaded(yes);     use-uniqid(yes); };  source s_syslog {     syslog(); };  destination d_elastic {     elasticsearch2(         index("syslog-ng")         type("test")         cluster("mycluster1")         client-mode("transport")         custom-id("$  {UNIQID}")         flush-limit("10000")     ); };  log {     source(s_syslog);     destination(d_elastic);     flags(flow-control); }; 

syslog-ng config for elastic search file:

options {                 threaded(yes);                 use-uniqid(yes);             };              source s_syslog {                 syslog();             };              destination d_elastic {                 elasticsearch2(                     index("syslog-ng")                     type("test")                     cluster("mycluster1")                     client-mode("transport")                     custom-id("$  {UNIQID}")                     flush-limit("10000")                 );             };              log {                 source(s_syslog);                 destination(d_elastic);                 flags(flow-control);             }; 

When I’m trying to sudo service syslog-ng restart i have the following error information:

Jan 11 11:14:44  syslog-ng[19156]: Error parsing destination statement, destination plugin elasticsearch2 not found in /etc/syslog-ng/conf.d/elastic.conf: Jan 11 11:14:44  syslog-ng[19156]: 6       source s_syslog { Jan 11 11:14:44  syslog-ng[19156]: 7           syslog(); Jan 11 11:14:44  syslog-ng[19156]: 8       }; Jan 11 11:14:44  syslog-ng[19156]: 9 Jan 11 11:14:44  syslog-ng[19156]: 10      destination d_elastic { Jan 11 11:14:44  syslog-ng[19156]: 11---->     elasticsearch2( Jan 11 11:14:44  syslog-ng[19156]: 11---->     ^^^^^^^^^^^^^^ Jan 11 11:14:44  syslog-ng[19156]: 12          index("syslog-ng") 

I have installed mod-java for syslog-ng and I have jdk, jre etc. What am I doing wrong? Thanks!