Deployment Architecture

When trying to save a scripted input on my search head, why am I getting error "In handler 'script': The file...does not exist"?

dperry
Communicator

I have a script located on my search head in /opt/splunk/bin/scripts/pull_data_to_splunk.py

I can execute the script manually in my search head. Here is the actual command:

python pull_data_into_splunk.py -api_key="my api key' -secret_key="mysecretcode' -url=myserver.abc.org -node_group_id=79

From the GUI, I go to Settings/Data Inputs/Scripts/Add New and when I try to save, I get this error:

Encountered the following error while trying to save: In handler 'script': The file "/opt/splunk/bin/scripts/python" does not exist.

IN the command field, what is the correct syntax?

0 Karma

jconger
Splunk Employee
Splunk Employee

Don't include "python". Just put in the name of your script.

0 Karma

dperry
Communicator

no dice....I have a script in the following location:

/opt/splunk/bin/scripts/pull_data_to_splunk.py

When I try to save the Data Inputs/Scripts/Add new

I have the added in the command field:
/opt/splunk/bin/scripts/pull_data_to_splunk.py

When I try to save I get "Encountered the following error while trying to save: In handler 'script': The file "/opt/splunk/bin/scripts/pull_data_into_splunk_no_args.py" does not exist."

0 Karma

jconger
Splunk Employee
Splunk Employee

Did you put the no args script in /opt/splunk/bin/scripts as well (pull_data_into_splunk_no_args.py)?

0 Karma

dperry
Communicator

Output: Encountered the following error while trying to save: In handler 'script': The file "/opt/splunk/bin/scripts/pull_data_into_splunk.py" does not exist.

Here is what I have in the command field:

opt/splunk/bin/scripts/python pull_data_into_splunk.py -api_key="my api key' -secret_key="mysecretcode' -url=myserver.abc.org -node_group_id=79

Am I missing quotes?

the example shown on the setup wizard - On Unix: /opt/splunk/bin/scripts/getData.sh foo "bar baz"

0 Karma

dperry
Communicator

correction...this is whats in the command field:

opt/splunk/bin/scripts/pull_data_into_splunk.py -api_key="my api key' -secret_key="mysecretcode' -url=myserver.abc.org -node_group_id=79

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...