batch

Enables batching so omhttp queues messages and submits them in a single HTTP request.

This parameter applies to omhttp: HTTP Output Module.

Name:

batch

Scope:

input

Type:

boolean

Default:

input=off

Required?:

no

Introduced:

Not specified

Description

Batch and bulkmode do the same thing, bulkmode is included for backwards compatibility. See the batch.format section for a detailed breakdown of how batching is implemented.

This parameter activates batching mode, which queues messages and sends them as a single request. There are several related parameters that specify the format and size of the batch: they are batch.format, batch.maxbytes, and batch.maxsize.

Note that rsyslog core is the ultimate authority on when a batch must be submitted, due to the way that batching is implemented. This plugin implements the output plugin transaction interface. There may be multiple batches in a single transaction, but a batch will never span multiple transactions. This means that if batch.maxsize or batch.maxbytes is set very large, you may never actually see batches hit this size. Additionally, the number of messages per transaction is determined by the size of the main, action, and ruleset queues as well.

The plugin flushes a batch early if either the configured batch.maxsize is reached or if adding the next message would exceed batch.maxbytes once serialized (format overhead included). When dynrestpath is enabled, a change of the effective REST path also forces a flush so that each batch targets a single path.

Additionally, due to some open issues with rsyslog and the transaction interface, batching requires some nuanced retry configuration. By default, omhttp signals transport/server failures to rsyslog core (suspend/resume), which performs retries. The retry.ruleset mechanism remains available for advanced per-message retry handling in batch mode.

Input usage

module(load="omhttp")

action(
    type="omhttp"
    batch="on"
)

See also

See also omhttp: HTTP Output Module.


Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project

Contributing: Source & docs: rsyslog source project

© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.