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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...