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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...