Splunk Search

No arguments provided

carmenho92
New Member

I followed the example in http://docs.splunk.com/Documentation/Splunk/5.0.2/AdvancedDev/SearchScripts.
When I want to do a search which is |mypyscript, my result is "Error in 'mypyscript' command: command="mypyscript", No arguments provided"
Why? Please help me.
Thanks

Tags (3)
0 Karma

LukeMurphey
Champion

Are you providing any arguments to your script? If you aren't then the script is likely failing at this line:

if len(sys.argv) < 2:
    splunk.Intersplunk.parseError("No arguments provided")

That line expects that an argument has been provided (since the example expects an argument).

0 Karma

LukeMurphey
Champion

@carmenho92: That error is because the script expects the arguments in the format: () [as ]

0 Karma

carmenho92
New Member

i tried entering |mypyscript ema n e result is Error in 'mypyscript' command: command="mypyscript", Invalid argument 'ema'
wad argument should i put?

0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...