Splunk Search

Parameters in script

dbashyam
Explorer

Hi, I have a script which needs parameters to be passed. I know that I can enroll the script in the input.conf file but any idea what is the keyword in inputs.conf file that accepts parameters.

For example: I have a script which is located in
/usr/test/dq_test.pl CHAN
/usr/test/dq_test.pl MAHN 0.25

So, how to pass parameter like CHAN and MAHN 0.25 in the inputs.conf file?

Any ideas?

Thanks,
Dinesh

Tags (2)
0 Karma

yannK
Splunk Employee
Splunk Employee

I think that it's in the script stanza directly;

[script:///usr/test/dq_test.pl MAHN 0.25]

yannK
Splunk Employee
Splunk Employee

on more recent splunk please prefer modular inputs instead of scripts :

https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ModInputsIntro

0 Karma

dbashyam
Explorer

Hi YannK...Sure I will definitely give back and comment after implementing this at my end. Thanks

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