---
title: Splunk HEC
slug: telemetry-pipeline/splunk-hec
docTags: 
createdAt: 2025-04-21T00:44:57.358Z
---

# Splunk HTTP Event Collector (HEC) Source

Receive log events using the Splunk HTTP Event Collector (HEC) API.

This source allows worker to act as a Splunk HEC-compatible receiver. It exposes multiple HTTP endpoints that fully implement the Splunk HEC ingestion protocol, enabling Splunk clients, forwarders, or applications to send logs directly into worker.

## Supported Endpoints

This source exposes the following Splunk HEC endpoints:

- /services/collector/event – JSON event ingestion&#x20;
- /services/collector/raw – Raw text ingestion&#x20;
- /services/collector/health – Health check endpoint&#x20;

These endpoints behave consistently with Splunk’s native HEC implementation.

## Ingestion Model

- Clients send log events using the Splunk HEC protocol&#x20;
- Events are authenticated using HEC tokens&#x20;
- Payloads are parsed and normalized into worker log events&#x20;
- Acknowledgements are tracked per channel (if enabled)&#x20;
- Events flow through the worker pipeline for processing and routing&#x20;

This makes the source suitable for replacing or fronting Splunk indexers.

## Reliability and Acknowledgements

- Supports Splunk-style indexed acknowledgements&#x20;
- Tracks acknowledgement state per HEC channel&#x20;
- Clients can query acknowledgement status using HEC semantics&#x20;
- Designed for high-throughput and large-scale ingestion&#x20;

## Source Configuration Parameters

## sources.\<id>.type

**required**
&#x20;**string**

Specifies the source type.

- Must be set to splunk\_hec&#x20;

## Acknowledgement Configuration

Controls how Splunk HEC acknowledgement channels are managed.

## sources.\<id>.acknowledgements

**optional**
&#x20;**object**

Top-level acknowledgement configuration for the Splunk HEC source.

### sources.\<id>.acknowledgements.enabled

**optional**
&#x20;**bool**

Enables end-to-end acknowledgements.

- Required for Splunk HEC indexed acknowledgement support&#x20;
- Allows clients to query delivery status&#x20;

### sources.\<id>.acknowledgements.ack\_idle\_cleanup

**optional**
&#x20;**bool**

Controls whether idle acknowledgement channels are automatically removed.

- A channel is considered idle if it is not used for:&#x20;
  - Sending events&#x20;
  - Querying acknowledgement status&#x20;

**Default**

:::BlockQuote
false
:::

### sources.\<id>.acknowledgements.max\_idle\_time

**optional**
&#x20;**uint**

Maximum time, in seconds, a channel may remain idle before removal.

- Channels may persist longer than this value&#x20;
- Clients should not rely on extended retention&#x20;

**Constraints**

- Minimum value: 1&#x20;

**Default**

:::BlockQuote
300
:::

### sources.\<id>.acknowledgements.max\_number\_of\_ack\_channels

**optional**
&#x20;**uint**

Maximum number of acknowledgement channels supported.

- Limits concurrent Splunk HEC clients&#x20;
- Prevents unbounded memory usage&#x20;

**Constraints**

- Minimum value: 1&#x20;

**Default**

:::BlockQuote
1,000,000
:::

### sources.\<id>.acknowledgements.max\_pending\_acks

**optional**
&#x20;**uint**

Maximum number of pending acknowledgement statuses across all channels.

- Equivalent to Splunk’s max\_number\_of\_acked\_requests\_pending\_query&#x20;

**Constraints**

- Minimum value: 1&#x20;

**Default**

:::BlockQuote
10,000,000
:::

### sources.\<id>.acknowledgements.max\_pending\_acks\_per\_channel

**optional**
&#x20;**uint**

Maximum number of pending acknowledgements per individual channel.

- Equivalent to Splunk’s per-channel acknowledgement limit&#x20;

**Constraints**

- Minimum value: 1&#x20;

**Default**

:::BlockQuote
1,000,000
:::

## Network Binding

## sources.\<id>.address

**optional**
&#x20;**string**

The socket address on which the Splunk HEC server listens.

- Must include a port&#x20;
- Binds to all interfaces by default&#x20;

**Default**

:::BlockQuote
0.0.0.0:8088
:::

## HTTP Keepalive Configuration

Controls connection lifecycle behavior for HEC clients.

## sources.\<id>.keepalive

**optional**
&#x20;**object**

Configures HTTP keepalive behavior.

### sources.\<id>.keepalive.max\_connection\_age\_secs

**optional**
&#x20;**uint**

Maximum lifetime of an HTTP connection.

- After this time, worker sends Connection: close&#x20;
- Applies to HTTP/0.9, HTTP/1.0, and HTTP/1.1&#x20;
- Can be set to a very large value to disable rotation&#x20;

**Default**

:::BlockQuote
300
:::

### sources.\<id>.keepalive.max\_connection\_age\_jitter\_factor

**optional**
&#x20;**float**

Adds randomness to the maximum connection lifetime.

- Prevents synchronized reconnects&#x20;
- Helps reduce connection storms&#x20;

Example:

- 0.1 → ±10% jitter&#x20;

**Default**

:::BlockQuote
0.1
:::

## Token Handling

## sources.\<id>.store\_hec\_token

**optional**
&#x20;**bool**

Controls whether the incoming Splunk HEC token is preserved.

- When enabled:&#x20;
  - Token is stored in event metadata&#x20;
  - Preferentially reused if forwarding to a Splunk HEC sink&#x20;

**Default**

:::BlockQuote
false
:::

## TLS Configuration

Secures the Splunk HEC endpoint.

## sources.\<id>.tls

**optional**
&#x20;**object**

Defines TLS behavior for incoming connections.

### sources.\<id>.tls.enabled

**optional**
&#x20;**bool**

Enables TLS encryption.

- Requires a server certificate&#x20;

### sources.\<id>.tls.crt\_file

**optional**
&#x20;**string**

Path to the server certificate file.

- PEM, DER, or PKCS#12 formats supported&#x20;
- Required when TLS is enabled&#x20;

### sources.\<id>.tls.key\_file

**optional**
&#x20;**string**

Path to the private key file.

- PEM or DER format&#x20;
- Required unless using PKCS#12&#x20;

### sources.\<id>.tls.key\_pass

**optional**
&#x20;**string**

Passphrase for encrypted private keys.

### sources.\<id>.tls.ca\_file

**optional**
&#x20;**string**

Additional CA certificates.

- Used for client certificate validation&#x20;

### sources.\<id>.tls.verify\_certificate

**optional**
&#x20;**bool**

Enables certificate chain verification.

- Ensures certificates are trusted and valid&#x20;
- Strongly recommended for production&#x20;

### sources.\<id>.tls.verify\_hostname

**optional**
&#x20;**bool**

Enables hostname verification.

- Ensures certificate identity matches the expected host&#x20;

### sources.\<id>.tls.alpn\_protocols

**optional**
&#x20;**array\[string]**

List of supported ALPN protocols, in priority order.

## Authorization Tokens

## sources.\<id>.token

**optional**
&#x20;**string**
&#x20;**deprecated**

Single authorization token.

- Deprecated in favor of valid\_tokens&#x20;

## sources.\<id>.valid\_tokens

**optional**
&#x20;**array\[string]**

List of valid Splunk HEC authorization tokens.

- Incoming requests must include one of these tokens&#x20;
- Tokens are provided via the Authorization header&#x20;
- If not set, requests are accepted without authentication&#x20;

## Reliability Characteristics

- At-least-once delivery semantics&#x20;
- Splunk-compatible acknowledgement model&#x20;
- High-throughput HTTP ingestion&#x20;
- Stateless processing&#x20;
- Backpressure-aware batching&#x20;

## Common Use Cases

- Replacing Splunk indexers at the edge&#x20;
- Fronting Splunk with a telemetry pipeline&#x20;
- Token-based multi-tenant ingestion&#x20;
- Log normalization before Splunk&#x20;
- Hybrid Splunk + non-Splunk backends
