Getting Data In

How do I add an API as a data source?

scottrunyon
Contributor

I would like to add an API as a new data source in Splunk. I did a search in Documentation, but all I was able to find was information on the Splunk API. What am I missing?

0 Karma

diogofgm
SplunkTrust
SplunkTrust

Try to use this modular input for REST API
https://splunkbase.splunk.com/app/1546/

------------
Hope I was able to help you. If so, some karma would be appreciated.
0 Karma

scottrunyon
Contributor

After much searching, I must agree that a script is the only way that I can do this. I found documentation on the application API and the basic setup is
1. Request a token, suppling "key", "username", "password" using HTTPS
2. Receive a token that expires after 30 minutes
3. Utilizing JWT, pass this token in the HTTPS authorization header of every request
4. Receive requested data in JSON format
5. Repeat 3 and 4 for each data point
6. And hope it doesn't take 30 minutes to complete the downloads

The application vendor has sample scripts (in C#) for each type of data requested so I can start converting to Python.

Which of these Data Inputs should I use REST API, HTTP Event Collector or Scripts?

0 Karma

pradeepkumarg
Influencer

Is this what you are looking for? http://dev.splunk.com/view/event-collector/SP-CAAAE6M
Not quite sure on your question

0 Karma

scottrunyon
Contributor

I am trying to do is download data over https. I have a tenant id, user id and pw. Not sure if I should be using the "HTTP Event Collector" or the "REST API" data input. I don't see any configuration entry on either one of these data inputs that fit the credentials I was provided.

0 Karma

somesoni2
SplunkTrust
SplunkTrust

May be write a script to do the download and write to a file which Splunk can monitor OR output to console ?

scottrunyon
Contributor

Doesn't having to write a script defeat the reason for the API? I was able to add a different API in version 6.3 of Splunk Enterprise but after the upgraded to 6.4.1, the input method has been changed and I don't see how to match the information I have to start the data input.

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...