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!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...