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!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...