1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
#############################################################################
# Copyright (c) 2015 Balabit
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published
# by the Free Software Foundation, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# As an additional exemption you are allowed to compile & link against the
# OpenSSL libraries as published by the OpenSSL project. See the file
# COPYING for details.
#
#############################################################################
@requires json-plugin
block destination elasticsearch2(
index()
type()
template("$(format-json --scope rfc5424 --exclude DATE --key ISODATE @timestamp=${ISODATE})")
port("")
server("localhost")
flush_limit("5000")
flush_timeout("0")
client_mode("node")
cluster("")
custom_id("")
resource("")
client_lib_dir("")
concurrent_requests("1")
skip_cluster_health_check("")
cluster_url("")
java_keystore_filepath("")
java_keystore_password("")
java_truststore_filepath("")
java_truststore_password("")
java_ssl_insecure("false")
http_auth_type("none")
http_auth_type_basic_username("")
http_auth_type_basic_password("")
time_zone("UTC")
...
)
{
@requires mod-java "The elasticsearch2() driver depends on the syslog-ng java module, please install the syslog-ng-mod-java (Debian & derivatives) or the syslog-ng-java (RHEL & co) package"
java(
class_path("`java-module-dir`/*.jar:`java-module-dir`/elastic-jest-client/*.jar:`client_lib_dir`/*.jar")
class_name("org.syslog_ng.elasticsearch_v2.ElasticSearchDestination")
option("index", `index`)
option("type", `type`)
option("server", `server`)
option("port", "`port`")
option("message-template", `template`)
option("cluster", "`cluster`")
option("flush_limit", `flush_limit`)
option("flush_timeout", `flush_timeout`)
option("client_mode", `client_mode`)
option("resource", "`resource`")
option("custom_id", "`custom_id`")
option("concurrent_requests", `concurrent_requests`)
option("skip_cluster_health_check", "`skip_cluster_health_check`")
option("cluster_url", "`cluster_url`")
option("java_keystore_filepath", "`java_keystore_filepath`")
option("java_keystore_password", "`java_keystore_password`")
option("java_truststore_filepath", "`java_truststore_filepath`")
option("java_truststore_password", "`java_truststore_password`")
option("java_ssl_insecure", `java_ssl_insecure`)
option("http_auth_type", `http_auth_type`)
option("http_auth_type_basic_username", "`http_auth_type_basic_username`")
option("http_auth_type_basic_password", "`http_auth_type_basic_password`")
time_zone(`time_zone`)
`__VARARGS__`
);
};
|