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