Hi,
I just tested this with the following simple config, and it works:
destination{
elasticsearch2(
client-lib-dir("/usr/share/elasticsearch/lib/")
index("syslog-ng-${HOST}")
type("test")
cluster-url("http://localhost:9200")
client-mode("http")
template("$(format-json --scope nv-pairs)")
);
};