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
Legend

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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...