opentelemetry() destination options
This section describes the options of the opentelemetry() destination in syslog-ng OSE.
The following options are available for the opentelemetry() destination.
auth()
The auth()
option can be used to set the authentication of the driver. The default state of this option is insecure
, as it is not defined.
The following sub-options are available for auth()
.
adc()
This option is an authentication method that is only available for destinations. For more information, see Application Default Credentials.
alts()
This option is an accessible authentication available for Google infrastructures. Service accounts can be listed with the nested target-service-account()
option, to match these against the server.
Example: configure an opentelemetry() destination using auth(alts())
destination {
opentelemetry(
url("otel-server:1234")
auth(alts())
);
};
insecure()
This option can be used to disable authentication: auth(insecure())
.
tls()
The tls()
option accepts the following nested sub-options.
destination {
opentelemetry(
url("your-otel-server:12346")
auth(
tls(
ca-file("/path/to/ca.pem")
key-file("/path/to/key.pem")
cert-file("/path/to/cert.pem")
)
)
);
};
batch-bytes()
Accepted values: | number [bytes] |
Default: | none |
Description: Sets the maximum size of payload in a batch. If the size of the messages reaches this value, syslog-ng OSE sends the batch to the destination even if the number of messages is less than the value of the batch-lines() option.
Note that if the batch-timeout() option is enabled and the queue becomes empty, syslog-ng OSE flushes the messages only if batch-timeout() expires, or the batch reaches the limit set in batch-bytes().
Available in syslog-ng OSE version 3.19 and later.
batch-lines()
Type: | number |
Default: | 1 |
Description: Specifies how many lines are flushed to a destination in one batch. The syslog-ng OSE application waits for this number of lines to accumulate and sends them off in a single batch. Increasing this number increases throughput as more messages are sent in a single batch, but also increases message latency.
For example, if you set batch-lines() to 100, syslog-ng OSE waits for 100 messages.
If the batch-timeout() option is disabled, the syslog-ng OSE application flushes the messages if it has sent batch-lines() number of messages, or the queue became empty. If you stop or reload syslog-ng OSE or in case of network sources, the connection with the client is closed, syslog-ng OSE automatically sends the unsent messages to the destination.
Note that if the batch-timeout() option is enabled and the queue becomes empty, syslog-ng OSE flushes the messages only if batch-timeout() expires, or the batch reaches the limit set in batch-lines().
For optimal performance, make sure that the syslog-ng OSE source that feeds messages to this destination is configured properly: the value of the log-iw-size() option of the source must be higher than the batch-lines()*workers() of the destination. Otherwise, the size of the batches cannot reach the batch-lines() limit.
batch-timeout()
Type: | time in milliseconds |
Default: | -1 (disabled) |
Description: Specifies the time syslog-ng OSE waits for lines to accumulate in the output buffer. The syslog-ng OSE application sends batches to the destinations evenly. The timer starts when the first message arrives to the buffer, so if only few messages arrive, syslog-ng OSE sends messages to the destination at most once every batch-timeout() milliseconds.
channel-args()
Type: | |
Default: |
Description: The channel-args()
option is available in gRPC-based drivers. The option accepts name-value pairs and sets channel arguments defined in the GRPC Core library documentation.
Example: channel-args() declaration
channel-args(
"grpc.loadreporting" => 1
"grpc.minimal_stack" => 0
)
compression()
Type: | boolean |
Default: | no |
Available in syslog-ng OSE 4.5 and later versions.
Description: This option enables compression in gRPC requests. Currently, only the deflate compression method is supported.
headers()
Type: | arrow list |
Default: | empty |
Available in syslog-ng OSE 4.8 and later versions.
Description: Adds custom gRPC headers to each RPC call. Currently only static header names and values are supported.
headers(
"organization" => "org-name"
"stream-name" => "org-stream"
)
Copyright © 2024 Axoflow
workers()
Type: | integer |
Default: | 1 |
Description: Specifies the number of worker threads (at least 1) that syslog-ng OSE uses to send messages to the server. Increasing the number of worker threads can drastically improve the performance of the destination.
CAUTION: Hazard of data loss! When you use more than one worker threads together with disk-based buffering, syslog-ng OSE creates a separate disk buffer for each worker thread. This means that decreasing the number of workers can result in losing data currently stored in the disk buffer files. Do not decrease the number of workers when the disk buffer files are in use.
If you are using load-balancing (that is, you have configured multiple servers in the url() option), increase the number of worker threads at least to the number of servers. For example, if you have set three URLs (url(“site1”, “site2”, “site3”)), set the workers() option to 3 or more.