# sumologic-http() destination options

The `sumologic-http()` destination supports all [HTTP destination options](../../../../docs/axosyslog-core/chapter-destinations/configuring-destinations-http-nonjava/reference-destination-http-nonjava/index.md).

In addition, the `sumologic-http()` destination also has the following options.

## 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, AxoSyslog 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, AxoSyslog flushes the messages only if `batch-timeout()` expires, or the batch reaches the limit set in `batch-bytes()`.

Available in AxoSyslog version 3.19 and later.

## batch-idle-timeout()

|   
---|---  
Type: | time in milliseconds  
Default: | `0` (disabled)  
  
Available in AxoSyslog 4.24 and later.

_Description:_ `batch-idle-timeout()` measures the elapsed time since the last message was added to the batch (`batch-timeout()` defines the maximum time used to collect a batch, starting from the first message). If either `batch-idle-timeout()` or `batch-timeout()` expires, AxoSyslog closes and sends the batch.

## batch-lines()

|   
---|---  
Type: | number  
Default: | 1  
  
_Description:_ Specifies how many lines are flushed to a destination in one batch. The AxoSyslog 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. To disable `batch-lines()`, set it to `0`.

For example, if you set `batch-lines()` to 100, AxoSyslog waits for 100 messages.

If the `batch-timeout()` option is disabled, the AxoSyslog application flushes the messages if it has sent `batch-lines()` number of messages, or the queue became empty. If you stop or reload AxoSyslog or in case of network sources, the connection with the client is closed, AxoSyslog automatically sends the unsent messages to the destination.

Note that if the `batch-timeout()` option is enabled and the queue becomes empty, AxoSyslog 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 AxoSyslog source that feeds messages to this destination is configured properly: the value of the `log-iw-size() / max-connections()` 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 AxoSyslog waits for lines to accumulate in the output buffer. The AxoSyslog application sends batches to the destinations evenly. The timer starts when the first message arrives to the buffer, so if only few messages arrive, AxoSyslog sends messages to the destination at most once every `batch-timeout()` milliseconds.

## ca-dir()

|   
---|---  
Accepted values: | Directory name  
Default: | none  
  
_Description:_ The name of a directory that contains a set of trusted CA certificates in PEM format. The CA certificate files have to be named after the 32-bit hash of the subject’s name. This naming can be created using the c_rehash utility in openssl. For an example, see [Configuring TLS on the AxoSyslog clients](../../../../docs/axosyslog-core/chapter-encrypted-transport-tls/tls-serverauth/procedure-configuring-tls-client/index.md). The AxoSyslog application uses the CA certificates in this directory to validate the certificate of the peer.

This option can be used together with the optional `ca-file()` option.

## ca-file()

|   
---|---  
Accepted values: | File name  
Default: | empty  
  
_Description:_ Optional. The name of a file that contains a set of trusted CA certificates in PEM format. The AxoSyslog application uses the CA certificates in this file to validate the certificate of the peer.

Example format in configuration:
```
 
       ca-file("/etc/pki/tls/certs/ca-bundle.crt")
    
```

Note The `ca-file()` option can be used together with the `ca-dir()` option, and it is relevant when `peer-verify()` is set to other than `no` or `optional-untrusted`. 

## collector()

|   
---|---  
Type: | string  
Default: | empty  
  
_Description:_ The Cloud Syslog Cloud Token that you received from the Sumo Logic service while [configuring your cloud syslog source](<https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/Cloud-Syslog-Source#configure-a-cloud%C2%A0syslog%C2%A0source>).

For details on the option in the destination’s declaration, see [Declaration for the sumologic-http() destination](../../../../docs/axosyslog-core/chapter-destinations/destination-sumologic-intro/index.md).

## deployment()

|   
---|---  
Type: | string  
Default: | empty string  
  
_Description:_ Required. This option specifies your [Sumo Logic deployment](<https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-and-Firewall-Security>).

For details on the `deployment()` option in the `sumologic-http()` destination’s declaration, see [Declaration for the sumologic-http() destination](../../../../docs/axosyslog-core/chapter-destinations/destination-sumologic-intro/index.md).

For details on the `deployment()` option in the `sumologic-syslog()` destination’s declaration, see [Declaration for the sumologic-syslog() destination](../../../../docs/axosyslog-core/chapter-destinations/destination-sumologic-intro/index.md).

## headers()

|   
---|---  
Type: | string list  
Default: | see description  
  
_Description:_ Custom HTTP headers to include in the request, for example, `headers("HEADER1: header1", "HEADER2: header2")`. If not set, only the default headers are included, but no custom headers.

The following headers are included by default:

  * X-Syslog-Host: `<host>`
  * X-Syslog-Program: `<program>`
  * X-Syslog-Facility: `<facility>`
  * X-Syslog-Level: `<loglevel/priority>`



Starting with AxoSyslog 4.18, you can use templates in the headers. Note that when using batching in the destination adn templates in `headers()`, the value of the template is calculated from the first message of the batch. Make sure to set the `worker-partition-key()` option properly to group similar messages.

If you want to use literal dollar signs (`$`) in `headers()`, escape them like `$$`.

Note The `headers()` option is a required option for the `sumologic-http()` destination. 

## time-reopen()

|   
---|---  
Accepted values: | number [seconds]  
Default: | 60  
  
_Description:_ The time to wait in seconds before a dead connection is reestablished.

## tls()

|   
---|---  
Type: | tls options  
Default: | n/a  
  
_Description:_ This option sets various options related to TLS encryption, for example, key/certificate files and trusted CA locations. TLS can be used only with tcp-based transport protocols. For details, see [TLS options](../../../../docs/axosyslog-core/chapter-encrypted-transport-tls/tlsoptions/index.md).

In version 4.0 and newer, using the `tls()` option is optional, and Sumo Logic servers are verified using the system certificate store by default. In earlier versions, this was a required option.

Last modified August 17, 2023: [chunk: add option-destination-threaded-batching (3e3df17)](<https://github.com/axoflow/axosyslog-core-docs/commit/3e3df17de544bc50586aa8167c2b062bb5d8d852>)