Expand description
The splunk-hec-logging node โ ships access logs to a Splunk HTTP Event
Collector (HEC) in batches.
Ports the APISIX splunk-hec-logging plugin onto featherbitโs shared
BatchSink. Each request builds a log entry,
wraps it in a Splunk HEC event envelope ({time, source, sourcetype, event}), and hands it to the sink with a non-blocking push; a background
task POSTs the concatenated events to the HEC uri with an
Authorization: Splunk <token> header. The node never mutates the
request/response and never fails, so it belongs in the response pipeline,
after the upstream node.
Structsยง
- Splunk
Flusher ๐ - Delivers batches by POSTing HEC events to the Splunk endpoint.
- Splunk
HecLogging Plugin - Batches access-log entries and POSTs them to a Splunk HEC endpoint.
Constantsยง
- DEFAULT_
SOURCE ๐ - DEFAULT_
SOURCETYPE ๐
Functionsยง
- build_
splunk_ ๐body - Serializes a batch into the HEC request body: HEC accepts multiple JSON event objects concatenated with no separator. Factored out for unit testing.
- wrap_
event ๐ - Wraps one log entry in a Splunk HEC event envelope with a shared timestamp.