Getting Data In

Error when I run custom Python script from one server to another sever using cURL (Search Factory: Unknown search command)

highsplunker
Contributor

Error when I run custom Python script from one server to another sever using cURL.
Error message in the CLI is this:
"Search Factory: Unknown search command"

Why this does not work from a Linux myServer2?
curl -k -u 'myUser:myPwd' https://myServer1:8089/services/search/jobs/export -d search=" | makeresults | myScript " -d output_mode=csv

But OK for search = " | makeresults | eval myVal=777 "
And OK for search = " | makeresults | sendemail to=\"myMail@myCompany.com\" subject=\"test_from_cli\" "
And OK for myScript if I run it from Splunk search box from myServer1 itself.

Splunk Enterprise version 6.5.2

The commands.conf:
[myScript]
filename = myScript.py

0 Karma
1 Solution

highsplunker
Contributor

SOLVED. OK.
OMG. Again it's about .../local.meta file. Hate it 🙂

I needed simply to add this stanza:

[commands/mySrcipt]
access = read : [ * ], write : [ admin, power ]
export = system
owner = myUsername

View solution in original post

0 Karma

highsplunker
Contributor

SOLVED. OK.
OMG. Again it's about .../local.meta file. Hate it 🙂

I needed simply to add this stanza:

[commands/mySrcipt]
access = read : [ * ], write : [ admin, power ]
export = system
owner = myUsername

0 Karma

highsplunker
Contributor

Again. So poor support here...

0 Karma

highsplunker
Contributor

I saw this issue https://answers.splunk.com/answers/521046/can-rest-api-be-used-to-execute-a-python-script-on.html?ch...

But it does not help.

And the problem remains if myServer1 == myServer2.

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