Getting Data In

Sending Post to HEC (Splunk Cloud) not working

codysysdig
New Member

Hi,

I've created my Data Input, enabled what needs to be enabled. The PUT works, and I get a Success response. However, when I try to search the activity logs using: source="http:", I get ZERO results.

curl -k :8088/services/collector -H "Authorization: Splunk XXXXXXXXXXXXXXXXX" -d '{"event": "hello world"}'

{"text":"Success","code":0}

Tags (3)
0 Karma

dhihoriya_splun
Splunk Employee
Splunk Employee

Hi @codysysdig

If you are sending the events via HEC curl then you can search the events from that particular HEC token via:

Query:
source="http:https input name"

Example:
If you have created HEC token with name "test123" and you are sending any event via mentioning the token ID in curl command then you can search event for test123 via :

source="http:test123"

Thanks,
Dixit

0 Karma

woodcock
Esteemed Legend

You should always ALWAYS specify input= in your search string. NEVER EVER rely on indexes searched by default because this can change arbitrarily at any moment. So if you are specifying index=summary in your HEC token definition and the events show up when you do index=summary then you actually do not have a problem. Is this your situation?

0 Karma

woodcock
Esteemed Legend

Does the index value tied to your HEC token actually exist? Are you doing an All time search on your sourcetype (sometimes events get mis-timestamped and end up in the future or way in the past)?

0 Karma

codysysdig
New Member

Yes, I've tried changing the time scale.

What I dont understand is why I can not see anything with source="http:inputname" but when I add index="summary", I can see my manual PUTs

0 Karma

harsmarvania57
Ultra Champion

What is the sourcetype you configured for HEC input ?

0 Karma

codysysdig
New Member

At first, I did not select one. Then I set it to _json, either way, I dont get results back on the search.

0 Karma

harsmarvania57
Ultra Champion

Can you please change sourcetype from _json to json_no_timestamp and try again?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...