7.7.1. HTTP destination options
http destination of syslog-ng OSE can directly post log messages to web services using the HTTP protocol. The
http destination has the following options. Some of these options are directly used by the Java code underlying the
http destination, therefore these options must be specified in the following format:
option("url", "http://<server-address>:<port-number>"). The exact format to use is indicated in the description of the option.
The following options are required:
url(). Note that to use
http, you must add the following line to the beginning of your syslog-ng OSE configuration:
Description: The name of the class (including the name of the package) that includes the destination driver to use.
http destination, use this option as
|Default:||The syslog-ng OSE module directory: /opt/syslog-ng/lib/syslog-ng/java-modules/|
Description: The list of the paths where the required Java classes are located. For example,
class-path("/opt/syslog-ng/lib/syslog-ng/java-modules/:/opt/my-java-libraries/libs/"). If you set this option multiple times in your syslog-ng OSE configuration (for example, because you have multiple Java-based destinations), syslog-ng OSE will merge every available paths to a single list.
http destination, include the path to the java modules of syslog-ng OSE, for example,
Description: Specify the Java Virtual Machine (JVM) settings of your Java destination from the syslog-ng OSE configuration file.
You can set this option only as a global option, by adding it to the
options statement of the syslog-ng configuration file.
|Default:||Use global setting.|
Description: The number of messages that the output queue can store.
|Type:||DELETE | HEAD | GET | OPTIONS | POST | PUT | TRACE|
Description: Specifies the HTTP method to use when sending the message to the server. Available in syslog-ng OSE version 3.7.2 and newer.
|Type:||number (of attempts)|
Description: The number of times syslog-ng OSE attempts to send a message to this destination. If syslog-ng OSE could not send a message, it will try again until the number of attempts reaches
retries, then drops the message.
|Default:||A format conforming to the default logfile format.|
Description: Specifies a template defining the logformat to be used in the destination. Macros are described in Section 11.1.5, Macros of syslog-ng OSE. Please note that for network destinations it might not be appropriate to change the template as it changes the on-wire format of the syslog protocol which might not be tolerated by stock syslog receivers (like
syslogd or syslog-ng itself). For network destinations make sure the receiver can cope with the custom format defined.
Description: Sets the maximum number of messages sent to the destination per second. Use this output-rate-limiting functionality only when using disk-buffer as well to avoid the risk of losing messages. Specifying
0 or a lower value sets the output limit to unlimited.
Description: Specifies the hostname or IP address and optionally the port number of the web service that can receive log data via HTTP. Use a colon (
:) after the address to specify the port number of the server. You can also use macros, templates, and template functions in the URL, for example: