How do I send an event to splunk using the splunk_hec_logs sink but keep metadata as metadata? #23006
-
What I mean is, if I have an input that sends something like: curl "https://mysplunkserver.example.com:8088/services/collector?channel=00872DC6-AC83-4EDE-8AFE-8413C3825C4C"
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
the Splunk HEC logs sink has fields you can use to define. the metadata so if you had an event in vector that is {
"message":"this is a tomato",
"index":"veggies",
"sourcetype":"tomato"
"timestamp": "2024-05-05T12:12:12Z"
} and the splunk hec sink was sinks:
my_sink_id:
type: splunk_hec_logs
encoding:
codec: text
inputs:
- my-source-or-transform-id
compression: none
endpoint: https://http-inputs-hec.splunkcloud.com
endpoint_target: event
index: "{{ index }}"
sourcetype: "{{ sourcetype }}"
timestamp_key: timestamp it would send the value of |
Beta Was this translation helpful? Give feedback.
the Splunk HEC logs sink has fields you can use to define. the metadata so if you had an event in vector that is
and the splunk hec sink was
it would send the value of
.message
to the indexveggies
, with a sourcetype oftomato
.