Splunk Enterprise

REST API Modular Input Help

AKG1_old1
Builder

Hello,

I am trying to connect NetBackup app to Splunk using REST API Modular Input App (https://splunkbase.splunk.com/app/1546/). Our use case is slightly complicated.  Request can be fulfilled in 2 steps. 

1. Need to send POST request and we get some token value as a results.

2. Send GET request using that token to get required data from NetBackup server.

Does anyone had similar situation earlier or having any suggestions to implement this scenario.

Update: I am able to implement 2 separate requests. Splunk is on windows platform. If it was on linux then I would have write a script which will  execute the first request using curl and copy  the token value to the input config of 2nd request. Not sure how to handle on windows platform.




Thanks

Labels (2)
Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

I pretty sure the REST API Modular Input app doesn't support 2-stage inputs.  I suggest you write your own modular input using this one as a guide.

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

AKG1_old1
Builder

Thanks, I get that. Then I was trying to create 2 different Inputs. 

To make it working probably I write some script which will copy and paste the token value for second request. but there is another issue. to get the token value it require to send some content as request body which I think is not available in this app.

I haven't work on python before so not sure if I can build new modular inputs looking at this.

 

0 Karma
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 ...