Getting Data In

user-specific configurations to scripted inputs as input arguments

wanling
Path Finder

I am working on a scripted input that requires user-specific configurations (e.g. AccountKey, UserToken) as input arguments. These settings are preferably configured at inputs.conf like AccountKey=xxx. However how can these be read by the script?

I've seen innovative way to put them in the script directly ([script:///usr/test/dq_test.pl MAHN 0.25]). But it's really not so neat, and can be quite messy if the number of arguments grows or the values are lengthy. In my case, these values are not known during development time, hence i need a more fool proof way to allow user to put them in.

Tags (1)
0 Karma

MuS
SplunkTrust
SplunkTrust

Hi wanling,

take a look at the Webmon App, download it and look at the scripts and who they handle looping through a .conf file. I used this app to start my own scripted inputs using .conf files.

If you get the script working with your .conf file you can use the REST API to modify your .conf and build a fool proof web UI for your users.

hope this helps to get you started ...

cheers, MuS

0 Karma

wanling
Path Finder

Hi MuS, thanks for the suggestion. After taking a look at the webmon app, i cant help thinking that 1) how is it different from modular input? Will modular input be a even better choice? 2) why not make use of the "interval" attribute for a scripted input, instead of implementing a loop with a sleeping break in the script?

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