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!

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...