Splunk Search

Help on input text token

jip31
Motivator

Hi

I use an input text token in.my dashboard in order to retrieve spécifications numériques for a field

It works but i would like the possibility to add >= before the number

Ex: >=200

How todo please?

Labels (1)
Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @jip31,

no, you doubled the field definition.

You have two choices:

  • insert the field definition in the text input, but in the search put only the token:
<label>logon</label>
<default></default>
<prefix>LastLogonAge&gt;=</prefix>

And after the stats command you can put

| search $logon$
  • don't use prefix and insert the field definition in the search
<label>logon</label>
<default></default>

And after the stats command you can put

| search LastLogonAge>=$logon$

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

HI @jip31 ,

you have to add a prefix to your text input 

    <input type="text" token="your_token">
      <label>Your Threshold</label>
      <default>0</default>
      <prefix>your_field&gt;=</prefix>
    </input>

Ciao.

Giuseppe

0 Karma

jip31
Motivator

Unfortunately not

Here is my code

<input type="text" token="logon">

<label>logon</label>

<default>•</default>

<prefix>&gt;=</prefix>

</input>

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @jip31,

in the prefix, you have to add also the field name:

<prefix>your_field&gt;=</prefix>

Ciao.

Giuseppe

0 Karma

jip31
Motivator

It doesnt works

<prefix>your_field&gt;=</prefix>

<prefix>LastLogon&gt;=</prefix>

 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @jip31,

could you share your code?

Ciao.

Giuseppe

0 Karma

jip31
Motivator

<input type="text" token="logon">

<label>logon</label>

<default>•</default>

<prefix>"LastLogonAge"&gt;=</prefix>

</input>

And after my stats command  i put

 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @jip31,

no, you doubled the field definition.

You have two choices:

  • insert the field definition in the text input, but in the search put only the token:
<label>logon</label>
<default></default>
<prefix>LastLogonAge&gt;=</prefix>

And after the stats command you can put

| search $logon$
  • don't use prefix and insert the field definition in the search
<label>logon</label>
<default></default>

And after the stats command you can put

| search LastLogonAge>=$logon$

Ciao.

Giuseppe

Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...