Splunk Search

Custom Command in Splunk

ansusabu
Communicator

I have created a python script and it is taking an argument . I have declared it ,like this`

hash = Option(
        doc='''
        **Syntax:** **ioc=***<fieldname>*
        **Description:** Name of the field which contains the hash''',
        require=True, validate=validators.Fieldname())`

No when I call the command "|command hash="1223333" from search, it is throwing "A value for *** command option hash is required". How to resolve the error?

0 Karma
Get Updates on the Splunk Community!

What You Read The Most: Splunk Lantern’s Most Popular Articles!

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

Announcing the General Availability of Splunk Enterprise Security 8.1!

We are pleased to announce the general availability of Splunk Enterprise Security 8.1. Splunk becomes the only ...

Developer Spotlight with William Searle

The Splunk Guy: A Developer’s Path from Web to Cloud William is a Splunk Professional Services Consultant with ...