Getting Data In

syntax for scripted input in inputs.conf

bfaber
Communicator

Am I correct in thinking that

[script://./bin/runmycmd.sh cmd]

will not work?

I'd like to be able to hand the variable cmd to runmycmd...

Tags (1)
0 Karma
1 Solution

ziegfried
Influencer

You can parameterize the scripted inputs. I've used this several times. So if you configure the scripted input this way

[script://./bin/runmycmd.sh cmd]

the value "cmd" will be avaiable to the script in the variable $1.

View solution in original post

ziegfried
Influencer

You can parameterize the scripted inputs. I've used this several times. So if you configure the scripted input this way

[script://./bin/runmycmd.sh cmd]

the value "cmd" will be avaiable to the script in the variable $1.

bfaber
Communicator

This worked. A warning for all, 'cmd' had to be the full path to the cmd file. For instance $SPLUNK_HOME/etc/apps/appname/bin/cmd

Thanks!

0 Karma
Get Updates on the Splunk Community!

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

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...