Event log messages collected by the Windows Event Collector for syslog-ng PE use this special source. To collect Windows event log messages, include this source in one of your source statements.
The Windows Event Collector tool for syslog-ng PE collects the log messages of Windows-based hosts in Unix datagram sockets, and then forwards them to a syslog-ng PE server over HTTPS (using TLS encryption and mutual authentication). syslog-ng PE reads the log messages using the windowsevent() source, and then parses the logs into key-value paris using the XML parser.
For more information, see Windows Event Collector Administration Guide.
source s_wec { windowsevent( prefix(".windowsevent.") unix-domain-socket("`syslog-ng-root`/var/run/wec.sock") ); };
The windowsevent() driver has the following options:
Type: | string |
Default: | ".windowsevent." |
Description: The prefix that you wish to append to the key-value pairs.
If you want to send Windows event logs to SDATA, then set prefix(".SDATA."). This can be useful, for example, when you forward Windows event logs to a syslog-ng Store Box.
Type: | string |
Default: | /opt/syslog-ng/var/run/wec.sock |
Description: The path to the Unix domain socket to read messages from.
A destination is where a log message is sent if the filtering rules match. Similarly to sources, destinations consist of one or more drivers, each defining where and how messages are sent.
|
TIP:
If no drivers are defined for a destination, all messages sent to the destination are discarded. This is equivalent to omitting the destination from the log statement. |
To define a destination, add a destination statement to the syslog-ng configuration file using the following syntax.
destination <identifier> { destination-driver(params); destination-driver(params); ... };
The following destination statement sends messages to the TCP port 1999 of the 10.1.2.3 host.
destination d_demo_tcp { network("10.1.2.3" port(1999)); };
If name resolution is configured, you can use the hostname of the target server as well.
destination d_tcp { network("target_host" port(1999)); };
|
Caution:
|
The following table lists the destination drivers available in syslog-ng PE.
Name | Description |
---|---|
elasticsearch and elasticsearch2 | Sends messages to an Elasticsearch server. The elasticsearch2 driver supports Elasticsearch version 2 and newer. |
file() | Writes messages to the specified file. |
graphite() | Sends metrics to a Graphite server to store numeric time-series data. |
hdfs() | Sends messages into a file on a Hadoop Distributed File System (HDFS) or MapR-FS node. |
http() | Sends messages over the HTTP protocol. |
kafka() | Publishes log messages to the Apache Kafka message bus, where subscribers can access them. |
logstore() | Writes messages securely into encrypted, compressed, and timestamped binary files. |
mongodb() | Sends messages to a MongoDB database. |
network() | Sends messages to a remote host using the BSD-syslog protocol over IPv4 and IPv6. Supports the TCP, UDP, ALTP, and TLS network protocols. |
pipe() | Writes messages to the specified named pipe. |
program() | Forks and launches the specified program, and sends messages to its standard input. |
smtp() | Sends e-mail messages to the specified recipients. |
Splunk | Forward your log messages to Splunk. |
sql() | Sends messages into an SQL database. In addition to the standard syslog-ng packages, the sql() destination requires database-specific packages to be installed. Refer to the section appropriate for your platform in Installing syslog-ng. |
syslog() | Sends messages to the specified remote host using the IETF-syslog protocol. The IETF standard supports message transport using the UDP, TCP, and TLS networking protocols. |
syslog-ng() | The syslog-ng() destination driver forwards log messages to another syslog-ng node in EWMM format. |
unix-dgram() | Sends messages to the specified unix socket in SOCK_DGRAM style (BSD). |
unix-stream() | Sends messages to the specified unix socket in SOCK_STREAM style (Linux). |
usertty() | Sends messages to the terminal of the specified user, if the user is logged in. |
Starting with version
|
NOTE:
In order to use this destination, syslog-ng Premium Edition must run in server mode. Typically, only the central syslog-ng Premium Edition server uses this destination. For details on the server mode, see Server mode. |
Note the following limitations when using the syslog-ng PE elasticsearch destination:
This destination is only supported on the Linux platforms that use the linux glibc2.11 installer, including: Debian 7 (wheezy), Red Hat ES 7, Ubuntu 12.04 (Precise Pangolin), Ubuntu 14.04 (Trusty Tahr).
Since syslog-ng PE uses the official Java Elasticsearch libraries, the elasticsearch destination has significant memory usage.
The log messages of the underlying client libraries are available in the internal() source of syslog-ng PE.
@module mod-java @include "scl.conf" elasticsearch( index("syslog-ng_${YEAR}.${MONTH}.${DAY}") type("test") cluster("syslog-ng") );
The following example defines an elasticsearch destination that sends messages in transport mode to an Elasticsearch server version 1.x running on the localhost, using only the required parameters.
@module mod-java @include "scl.conf" destination d_elastic { elasticsearch( index("syslog-ng_${YEAR}.${MONTH}.${DAY}") type("test") ); };
The following example sends 10000 messages in a batch, in transport mode, and includes a custom unique ID for each message.
@module mod-java @include "scl.conf" options { threaded(yes); use-uniqid(yes); }; source s_syslog { syslog(); }; destination d_elastic { elasticsearch( index("syslog-ng_${YEAR}.${MONTH}.${DAY}") type("test") cluster("syslog-ng") client-mode("transport") custom-id("${UNIQID}") flush-limit("10000") ); }; log { source(s_syslog); destination(d_elastic); flags(flow-control); };
To install the software required for the elasticsearch destination, see Prerequisites.
For details on how the elasticsearch destination works, see How syslog-ng PE interacts with Elasticsearch.
For the list of options, see Elasticsearch destination options.
© 2021 One Identity LLC. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy