---
title: "splunk-s2s: Receive data from Splunk forwarders"
url: "https://axoflow.com/docs/axosyslog-core/chapter-sources/splunk-s2s/"
description: "Receive data from Splunk Universal and Heavy Forwarders over the Splunk-to-Splunk (S2S) protocol using the network() source."
last_modified: "2026-11-26T12:17:47+01:00"
---

> For the complete documentation index, see [llms.txt](https://axoflow.com/docs/axosyslog-core/llms.txt).

# splunk-s2s: Receive data from Splunk forwarders

Receive data from Splunk Universal and Heavy Forwarders over the Splunk-to-Splunk (S2S) protocol using the network() source.

The `splunk-s2s` transport of the [`network()` source](https://axoflow.com/docs/axosyslog-core/chapter-sources/configuring-sources-network/index.md)
acts as a Splunk indexer. Your Splunk forwarders can send their data to AxoSyslog over the Splunk-to-Splunk (S2S) protocol. Then you can process and route the data before you forward it.

To send data to a Splunk indexer over S2S, see [splunk-s2s: Send data to Splunk indexers](https://axoflow.com/docs/axosyslog-core/chapter-destinations/splunk-s2s/index.md).

AxoSyslog can receive data from Splunk clients in two ways:

- The `splunk-s2s` transport receives data from Splunk Universal and Heavy Forwarders over the S2S protocol.
- The [`splunk-hec()` source](https://axoflow.com/docs/axosyslog-core/chapter-sources/splunk-hec/index.md)
  receives data from clients that send it over HTTP to the HTTP Event Collector (HEC), for example, from Splunk Connect for Syslog (SC4S).

## Prerequisites

- AxoSyslog version 4.30 or later.
- This feature requires a separate module. Install the `axosyslog-mod-splunk-s2s` package on [Debian/Ubuntu](https://axoflow.com/docs/axosyslog-core/install/debian-ubuntu/index.md)
  , or the `axosyslog-splunk-s2s` package on [RHEL and compatible distributions](https://axoflow.com/docs/axosyslog-core/install/rhel-fedora-almalinux/index.md)
  . If the module isn’t installed, AxoSyslog fails to start with an [`unexpected LL_IDENTIFIER` error](https://axoflow.com/docs/axosyslog-core/chapter-troubleshooting-syslog-ng/unexpected-ll-identifier/index.md)
  .
- Disable compression on the forwarders. AxoSyslog doesn’t support compressed S2S streams.

## Example: Receiving data from a Splunk forwarder

The following source listens for S2S connections on port 9997, the default receiving port of Splunk indexers:

```shell
source s_splunk_forwarders {
  network(
    port(9997)
    transport("splunk-s2s")
    flags(no-parse)
  );
};

destination d_splunk_events {
  file("/var/log/splunk-events.log" template("${.splunk.sourcetype} ${HOST} ${MESSAGE}\n"));
};

log {
  source(s_splunk_forwarders);
  destination(d_splunk_events);
};
```

Use the `flags(no-parse)` option: the events of the forwarders aren’t syslog messages, and the syslog parser would modify them.

On the forwarder, add AxoSyslog as a receiver in the `outputs.conf` file, and disable compression, for example:

```ini
[tcpout]
defaultGroup = axosyslog

[tcpout:axosyslog]
server = <IP-of-AxoSyslog>:9997
compressed = false
```

To receive the data over TLS, add a [`tls()` option](https://axoflow.com/docs/axosyslog-core/chapter-encrypted-transport-tls/tlsoptions/index.md)
to the source, and configure TLS on the forwarder.

## How splunk-s2s processes the events

- If the forwarder sends separate events, every event becomes a separate log message. Heavy Forwarders usually send their data this way.
- If the forwarder sends raw chunks of data, AxoSyslog splits the chunks into lines, and every line becomes a separate log message. Universal Forwarders usually send the content of the monitored files this way. AxoSyslog doesn’t merge multi-line events.
- The `${MESSAGE}` macro contains the raw event or line, without a syslog header.
- The timestamp of the message is the time of the event, if the forwarder sends it. Otherwise, it’s the time when AxoSyslog received the event.

AxoSyslog sets the following name-value pairs from the metadata of the event, if the forwarder sends them:

| Name-value pair | Splunk metadata |
| --- | --- |
| `${.splunk.index}` | `index` |
| `${.splunk.source}` | `source` |
| `${.splunk.sourcetype}` | `sourcetype` |
| `${.splunk.host}` | `host` |

AxoSyslog also sets the `${HOST}` macro to the `host` value of the event.

### Acknowledgements to the forwarders

If the forwarder uses indexer acknowledgement (`useACK = true` in `outputs.conf`), AxoSyslog acknowledges every event when it receives the event.

**CAUTION:**

The acknowledgement doesn’t mean that AxoSyslog has stored the event. After the acknowledgement, the forwarder doesn’t resend the event. If AxoSyslog stops before it stores the event, the event is lost, also when you use flow control or a disk-buffer.

## Options of the splunk-s2s transport

The `splunk-s2s` transport doesn’t have options of its own. The [options of the `network()` source](https://axoflow.com/docs/axosyslog-core/chapter-sources/configuring-sources-network/reference-source-network/index.md)
apply, for example:

- [`flags()`](https://axoflow.com/docs/axosyslog-core/chapter-sources/configuring-sources-network/reference-source-network/index.md#flags)
  : Use `flags(no-parse)`.
- [`log-msg-size()`](https://axoflow.com/docs/axosyslog-core/chapter-sources/configuring-sources-network/reference-source-network/index.md#log-msg-size)
  : The maximal size of a single event. If an event is larger, AxoSyslog logs an error and closes the connection. To accept the event and truncate it to `log-msg-size()` instead, set [`trim-large-messages(yes)`](https://axoflow.com/docs/axosyslog-core/chapter-sources/configuring-sources-network/reference-source-network/index.md#trim-large-messages)
  .
- `port()`: The default port of the `splunk-s2s` transport is 9997.
- `tls()`: AxoSyslog starts the TLS handshake with the first byte of the connection.

## Troubleshooting splunk-s2s connections

If the forwarder can’t send data to AxoSyslog, check the internal log of AxoSyslog for the following error messages.

The forwarder compresses the data. To fix it, set `compressed = false` in the `outputs.conf` file of the forwarder. The error message is one of the following:

- `splunk-s2s: the forwarder requested stream compression, which is not supported, set compressed=false in its outputs.conf`
- `splunk-s2s: the forwarder speaks the legacy compressed protocol, which is not supported, set compressed=false in its outputs.conf`
- `splunk-s2s: the forwarder compresses the stream, which is not supported, set compressed=false in its outputs.conf`
- `splunk-s2s: the forwarder switched to stream compression, which is not supported, set compressed=false in its outputs.conf`

Other error messages:

- `splunk-s2s: invalid greeting, the peer is probably not a Splunk forwarder`: The client doesn’t use the S2S protocol. For example, it sends syslog messages or HEC requests to this port.
- `splunk-s2s: incoming event larger than log-msg-size()`: Increase the `log-msg-size()` of the source, or set `trim-large-messages(yes)`.
- `splunk-s2s: incoming packet larger than the receive buffer, increase log-msg-size()`: A single packet of the forwarder is larger than the receive buffer of AxoSyslog. Increase the `log-msg-size()` of the source.

Last modified November 26, 2026: [Document the splunk-s2s transport of network() (c8e827d7)](https://github.com/axoflow/axosyslog-core-docs/commit/c8e827d710eb3f59d046c3286f1ac7fe493ff58f)
