Getting Data In

HEC event field

Haleb
Explorer

I need to connect data from a third party application via HEC to Splunk. It sends data in this format 1 event per request:

{
"field1":"value",
"field2":"value"
}

After looking at the documentation for HEC, I discovered that for events to work correctly, they must have the following format:

{
"event":{
    "field1":"value",
    "field2":"value"
    }
}

 Otherwise I receive an error:

{"text":"No data","code":5}

I don't have the ability to change the event format on the third-party application side. How can this problem be solved?

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

There are several ways to send data to HEC and not all of them use that format.  The raw endpoint should accept events in your desired format.  See https://docs.splunk.com/Documentation/Splunk/8.0.5/Data/FormateventsforHTTPEventCollector#Format_eve...

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

There are several ways to send data to HEC and not all of them use that format.  The raw endpoint should accept events in your desired format.  See https://docs.splunk.com/Documentation/Splunk/8.0.5/Data/FormateventsforHTTPEventCollector#Format_eve...

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...