Skip to main content
Version: 0.3.0

Splunk connector

Class: splunk — integrates with Splunk. Sources pull or receive via Splunk-oriented endpoints and publish to a stream; sinks subscribe to a stream and deliver toward Splunk, commonly HTTP Event Collector (HEC).

Create and edit under Sources and Sinks. Advanced Settings may expose more runtime options depending on deployment and permissions.

Source and sink behavior​

RoleBehavior
SourceHEC listen on endpoint with one Splunk token (Authorization: Splunk). POST /services/collector/event accepts one JSON object, a JSON array, or concatenated JSON. POST /services/collector/raw is one event per non-empty line, including a line that contains only spaces. Blank lines are skipped. An empty or blank-only body is HTTP 200, code 0, and queues nothing. Query sourcetype, host, index, source, and numeric time stay on metadata.splunk. channel is optional: a non-empty X-Splunk-Request-Channel wins over a non-empty channel query parameter, and any non-empty string is kept. The request is all or nothing. Every auth failure is HTTP 401, code 4, Invalid token. Malformed input and a non-gzip Content-Encoding are HTTP 400, code 6, Invalid data format. More than 10000 events is HTTP 400, code 6, Too many events. Bounded ingest queue (1024 POST batches). HTTP 200 means acceptance into PADAS memory, not WAL or sink delivery. A full channel is HTTP 503, code 9 (no Retry-After). Health stays {"text":"HEC is healthy"}. Generic webhooks use http_server. The PADAS HEC source does not implement POST /services/collector/ack. Operators must not send from clients that require HEC indexer acknowledgement (a Splunk HEC token with useACK=true, or any client that will not transmit unless it can poll that path and receive ack IDs). HTTP 200 {text, code: 0} after enqueue is the accept contract. Splunk Universal Forwarder httpout does not use this ack path. Sink enable_ack only sets X-Splunk-Request-Channel on outbound HEC posts and does not add this endpoint.
SinkStream subscription → HEC POST to /services/collector/event on the Splunk base URL in endpoint, authenticated with the HEC token. hec_raw defaults off and keeps that path. When it is on, the sink POSTs the raw_field string to /services/collector/raw; the body is that string only. Delivery follows the collector JSON code (not indexer ack). hec_time default none omits root time (Splunk props/transforms). One sink overlaps HEC posts up to max_in_flight (default 4). 1 is one POST at a time.
StreamsSame stream wiring model as other classes (Streams).

Required fields​

Every connector row​

FieldRequiredNotes
nameYesDisplay name; id derived from it.
classYesMust be splunk.
streamYesResolved stream id.
typeYessource or sink from the screen used at create time.
configYesClass-specific object; see below.

Class splunk — required configuration​

SettingRequiredNotes
endpointYesSource: HEC listen URL (for example http://localhost:8088/services/collector/event). Sink: Splunk base URL (for example https://splunk.example.com:8088 or with a trailing slash). The sink appends /services/collector/event. When hec_raw is on, it POSTs /services/collector/raw instead. A URL that already ends with /services/collector/event is unchanged until that switch selects the raw path. token, auto_extract_timestamp, and time query parameters are rejected (put the HEC token in token), as is any path other than / or /services/collector/event.
tokenYesHEC token (UI: HEC Token).

Create connector​

  1. Open Sources or Sinks → Create.
  2. Set Class to Splunk, set name, stream behavior, and Enabled.
  3. Enter Endpoint and HEC Token. For a sink, Endpoint is a Splunk base URL (https://splunk.example.com:8088). Set HEC time to none (default), event_time, or auto_extract (legacy index_time means none). Leave HEC raw off to keep /services/collector/event. Turn HEC raw on to POST one string field to /services/collector/raw, and set Raw field to that field name.
  4. Add TLS, headers, or batch limits from Common configuration when available.
  5. Save, then wire the stream into tasks / pipelines.

Source (UI)​

Create New Source modal with Class Splunk: Endpoint and HEC Token
The Splunk source connector form.
UI fieldConnector setting
Endpoint (required)endpoint — HEC listen URL
HEC Token (required)token (exact nested key may vary by build—confirm via Registry export if needed)

Sink (UI)​

Endpoint is a Splunk base URL. The form also includes HEC time, HEC raw, Raw field, per-event metadata field names, Max in flight, and Max Bytes per Batch.

Splunk connector Config: Endpoint and HEC Token
The Splunk sink connector form.
UI fieldConnector setting
Endpoint (required)endpoint — Splunk base URL, for example https://splunk.example.com:8088. A token query is rejected; put the HEC token in HEC Token.
HEC Token (required)token
HEC timehec_time — none (default), event_time, or auto_extract (legacy index_time means none)
HEC rawhec_raw — switch, default off. On posts Raw field to /services/collector/raw. Off keeps /services/collector/event and ignores Raw field.
Raw fieldraw_field — top-level event field. Its string value is the raw body when HEC raw is on. Required then; ignored when the switch is off.
Index fieldindex_field — top-level event field for HEC index when the value is a non-empty string; the field stays in the nested event
Source fieldsource_field — same rule for HEC source
Sourcetype fieldsourcetype_field — same rule for HEC sourcetype
Host fieldhost_field — same rule for HEC host
Indexed fieldsindexed_fields — event field names copied into HEC fields as scalars (string, number, or bool); keys stay in the nested event
Max in flightmax_in_flight — HEC posts from one flush that may be open at once. Default 4, allowed 1–8. 1 is one POST at a time.
Max Bytes per Batchbatch.max_bytes — uncompressed body size that splits a flush. Default 1 MB (1000000). Minimum 1.

Configuration​

Beyond the required pair, exports often include:

  • index, source, sourcetype, host — Connector-level HEC metadata. On the event endpoint, used when the matching *_field lift does not apply (missing field, null, non-string, or empty string). Omitting index / source / sourcetype leaves the token default. Omitting host uses the connector host fallback.
  • index_field, source_field, sourcetype_field, host_field — Sink only. Top-level event field names on the event endpoint. A non-empty JSON string at that key becomes the HEC root value for that slot; the key remains in the nested event. Otherwise the connector-level value above is the fallback. Source connectors ignore these fields.
  • indexed_fields — Sink only. Array of event field names. For each name, a JSON string, number, or bool is copied into HEC fields on the event endpoint; the key stays in the nested event. Object, array, and null are skipped. Omit HEC fields when nothing was copied. Source connectors ignore this field.
  • hec_time — Sink only. none (default) omits HEC root time so Splunk props/transforms own _time. event_time sets root time from the PADAS envelope for JSON and text (text stays a string). auto_extract asks Splunk HEC auto-extract and omits root time (that parse depends on the sourcetype). Legacy index_time means none. On the raw path, auto_extract still adds auto_extract_timestamp=true to the query string, and event_time does not add a time field to the raw line. Source connectors ignore this field.
  • hec_raw — Sink only. Default off. Off keeps /services/collector/event and does not read raw_field. On, the sink POSTs that string field to /services/collector/raw. The body is that string only. The query string is connector-level sourcetype, source, and index when set, then host always (the same cached host as the event path). Empty and non-string values are not posted. Source connectors ignore this field.
  • raw_field — Sink only. One top-level event field name. Required when hec_raw is on; ignored when it is off. Source connectors ignore this field.
  • enable_ack — Sink only. When true, every HEC POST sends one X-Splunk-Request-Channel UUID for the life of the connector. The sink does not poll indexer acknowledgments; this is not guaranteed delivery.
  • max_in_flight — Sink only. How many HEC posts from one flush may be in flight. Default 4, allowed 1–8. 1 sends one POST at a time. Source connectors ignore this field.
  • batch.max_bytes — Sink. Uncompressed body size that splits a flush into HEC posts. Default 1 MB (1000000). Minimum 1. One event larger than that limit is still posted whole.
  • batch.max_events — When a Splunk sink omits this, the runtime uses 5000. An explicit value is kept.
  • tls — Verify Splunk server certificates in production.
  • authentication — Extra headers or schemes when HEC is wrapped.

Runtime behavior​

  • Connectors run after deployment; Disabled connectors do not listen or call HEC.
  • Source (HEC): POST /services/collector/event accepts one JSON object, a JSON array, or concatenated JSON. POST /services/collector/raw is one event per non-empty line, including a line that contains only spaces. Blank lines are skipped. An empty or blank-only body is HTTP 200, code 0, and queues nothing. The request is all or nothing. One token. Every auth failure is HTTP 401, code 4, Invalid token. Malformed input and a non-gzip Content-Encoding are HTTP 400, code 6, Invalid data format. More than 10000 events is HTTP 400, code 6, Too many events. HTTP 200 means acceptance into PADAS memory, not WAL or sink delivery. A full channel is HTTP 503, code 9 (UF/HF retry 5xx). Health stays {"text":"HEC is healthy"}. Same bounded helper as HTTP server; HTTP server maps full to 429 instead. The PADAS HEC source does not implement POST /services/collector/ack. Operators must not send from clients that require HEC indexer acknowledgement (a Splunk HEC token with useACK=true, or any client that will not transmit unless it can poll that path and receive ack IDs). HTTP 200 {text, code: 0} after enqueue is the accept contract. Splunk Universal Forwarder httpout does not use this ack path. Sink enable_ack only sets X-Splunk-Request-Channel on outbound HEC posts and does not add this endpoint.
  • Sink start GETs /services/collector/health (no Authorization). Non-2xx fails start; the sink does not POST events until health succeeds.
  • Sink accept is the collector JSON code on the HEC response, not indexer ack. Auth failures (401 / 403) fail fast. Retries cover transport failure and HTTP 408, 429, 500, and 503 only. The HEC client does not follow redirects.

Performance and operational notes​

  • Overlapping HEC posts are how one sink reaches about 25K events/s of about 2 KB events: max_in_flight 4 and batch.max_bytes at 1 MB. Set max_in_flight to 1 for one POST at a time.
  • When batch.max_events is omitted, a Splunk sink flushes at 5000 events.
  • Keep batch.max_bytes within the indexer’s HEC max_content_length, and size the sink for license throughput.
  • Rotate HEC tokens on compromise; treat tokens as secrets.