destination: Forward, send, and store log messages
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); ... };
Example: A simple destination statement
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 OSE.
The following destination driver groups are available in syslog-ng OSE: