Splunk Search

How to use tokens in custom search commands

ketaka
Explorer

I want to use dashboard text input in custom search command.
Please tell me some tips such as how to use and sentences.

I have set up a text input field in the dashboard as "sysCableNAme_token", and I want to pass the value to a custom search command and use it.

Search with token and custom search commands are successful separately.

Thank you.

Tags (1)
0 Karma
1 Solution

jkat54
SplunkTrust
SplunkTrust
 | yourCustomCommand $sysCableNAme_token$

View solution in original post

0 Karma

jkat54
SplunkTrust
SplunkTrust
 | yourCustomCommand $sysCableNAme_token$
0 Karma

ketaka
Explorer

Thank you jkat54 ♦ !

We received the value in the following Python.

import sys
args = sys.argv
print(args[0])
print(args[1])
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...