Skip to content

Splunk HEC

Splunk HEC (splunk-hec)

Output events to a Splunk HTTP Event Collector endpoint (Splunk HEC).

Observability json

Minimal example

output:
splunk-hec:
hec-token:
hec-token-value: ~
url: ""
JSON
{
"output": {
"splunk-hec": {
"hec-token": {
"hec-token-value": null
},
"url": ""
}
}
}

Contents

Fields

FieldTypeRequiredDescription
url Endpointurl (string)The URL of the Splunk HEC instance (example: https://127.0.0.1:8088/services/collector/event).
Examples: https://example.com/path
hec-token Collector OptionsHec TokenSpecify a value to use for the HEC Token or set it using an event field.
batch ProcessingBatchBatching input events together.
retry ReliabilityRetryHow to retry this operation.
insecure Securityboolean (bool)Ignore TLS certificate validation errors (This is not recommended).
metrics Collector Optionsboolean (bool)Send a metrics formatted payload to the HEC endpoint.
event-field Collector Optionsfield (string)If specified, the field’s contents will be submitted as the event payload to the endpoint.
Examples: data_field
time-field Collector Optionsfield (string)Use the specified field for the timestamp of the endpoint. This should be in Unix epoch format.
Examples: data_field
index Collector OptionsIndexSpecify a value to use for the Splunk index or set it using an event field.
host Collector OptionsHostSpecify a value to use for the Splunk host or set it using an event field.
source Collector OptionsSourceSpecify a value to use for the Splunk source or set it using an event field.
sourcetype Collector OptionsSourcetypeSpecify a value to use for the Splunk sourcetype or set it using an event field.
remove Collector Optionsboolean (bool)Consume (remove) fields from the event payload before submitting to the endpoint. Applicable to time-field, host-field, source-field, sourcetype-field, index-field and hec-token-field.
disable-preflight Securityboolean (bool)Disable the Splunk HEC “preflight” verification request (not recommended). When enabled (default), LyftData performs a lightweight request to a derived HEC health URL before sending any event payloads, to reduce the risk of accidental misconfiguration sending sensitive data to a non-HEC endpoint.

Processing

Show fields
FieldTypeRequiredDescription
batchBatchBatching input events together.

Reliability

Show fields
FieldTypeRequiredDescription
retryRetryHow to retry this operation.

Endpoint

Show fields
FieldTypeRequiredDescription
urlurl (string)The URL of the Splunk HEC instance (example: https://127.0.0.1:8088/services/collector/event).
Examples: https://example.com/path

Collector Options

Show fields
FieldTypeRequiredDescription
hec-tokenHec TokenSpecify a value to use for the HEC Token or set it using an event field.
metricsboolean (bool)Send a metrics formatted payload to the HEC endpoint.
event-fieldfield (string)If specified, the field’s contents will be submitted as the event payload to the endpoint.
Examples: data_field
time-fieldfield (string)Use the specified field for the timestamp of the endpoint. This should be in Unix epoch format.
Examples: data_field
indexIndexSpecify a value to use for the Splunk index or set it using an event field.
hostHostSpecify a value to use for the Splunk host or set it using an event field.
sourceSourceSpecify a value to use for the Splunk source or set it using an event field.
sourcetypeSourcetypeSpecify a value to use for the Splunk sourcetype or set it using an event field.
removeboolean (bool)Consume (remove) fields from the event payload before submitting to the endpoint. Applicable to time-field, host-field, source-field, sourcetype-field, index-field and hec-token-field.

Security

Show fields
FieldTypeRequiredDescription
insecureboolean (bool)Ignore TLS certificate validation errors (This is not recommended).
disable-preflightboolean (bool)Disable the Splunk HEC “preflight” verification request (not recommended). When enabled (default), LyftData performs a lightweight request to a derived HEC health URL before sending any event payloads, to reduce the risk of accidental misconfiguration sending sensitive data to a non-HEC endpoint.

Schema

Hec Token Options

OptionNameTypeDescription
hec-token-valueHec Token Valuestring
hec-token-fieldHec Token Fieldstring

Index Options

OptionNameTypeDescription
index-valueIndex Valuestring
index-fieldIndex Fieldstring

Host Options

OptionNameTypeDescription
host-valueHost Valuestring
host-fieldHost Fieldstring

Source Options

OptionNameTypeDescription
source-valueSource Valuestring
source-fieldSource Fieldstring

Sourcetype Options

OptionNameTypeDescription
source-type-valueSource Type Valuestring
source-type-fieldSource Type Fieldstring

Batch Fields

FieldTypeRequiredDescription
fixed-sizenumber (integer)maximum number of events in an output batch.
Examples: 42, 1.2e-10
modeModeIf ‘document’ send on end of document generated by input. If ‘fixed’, use fixed_size.
Allowed values: fixed, document
timeouttime-interval (string)interval after which the batch is sent, to keep throughput going (default 100ms).
Examples: 500ms, 2h
headermultiline-text (string)put a header line before the batch.
footermultiline-text (string)put a header line after the last line of the batch.
use-document-markerboolean (bool)Enrich the job metadata with a document marker (for document handling in batch mode).
wrap-as-jsonboolean (bool)Format the output batch as a JSON array.

Retry Fields

FieldTypeRequiredDescription
timeouttime-interval (string)timeout (e.g. 500ms, 2s etc. - default is 30).
Examples: 500ms, 2h
retriesnumber (integer)number of retries.
Examples: 42, 1.2e-10

Batch - Mode Options

ValueDescription
fixedFixed
documentDocument