Getting Data In

RE: HTTP Event Collector target index- Is there a way to specify in the curl command the target index?

mark-jones
Explorer

Hello,

Is there a way to specify in the curl command the target index?

For example with the following command, how can i target an index named: scheduler  in the command line?

curl -k https://prd-plot.splunkcloud.com:8088/services/collector -H "Authorization:Splunk #####-4f99-b680-72c7bd33f9bb" -d "{\"sourcetype\"😕"_json\",\"event\": {\"a\": \"value1\", \"b\": [\"value1_1\", \"value1_2\"]}}"
 
Thanks,
Mark
Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

You should be able to specify the index the same you do the sourcetype.

curl -k https://prd-plot.splunkcloud.com:8088/services/collector -H "Authorization:Splunk #####-4f99-b680-72c7bd33f9bb" -d "{\"sourcetype\":\"_json\",\"index\": \"scheduler\",\"event\": {\"a\": \"value1\", \"b\": [\"value1_1\", \"value1_2\"]}}"
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...