Splunk Search

useage of query result

ronenp
New Member

hello ,
i am new to splunk and i have a bit of a problem with using the results from the query,

<condition match=" 'results.res' >0"> doesn't work so as the $job.resultCount$

if i try to use 'job.resultCount' or $job.resultCount$ it works but that not what i need

query :
<search id="parsing_queue">
index=_internal source = "udp:514" sourcetype = "syslog" alert | stats count as res
-24h@h
now

$job.resultCount$


no val

thank you all

ronen

0 Karma

chimell
Motivator

HI ronenp
try to use this :

<search id="parsing_queue">
      <query>index=_internal source = "udp:514" sourcetype = "syslog" alert | stats count </query>
      <earliest>-24h@h</earliest>
      <latest>now</latest>
      <progress>
           <condition match="'job.resultCount' >0">
               <set token="show_table">true</set>
           </condition>
           <condition>
               <unset token="show_table"/>
           </condition>
       </progress>
   </search>
0 Karma

vasanthmss
Motivator

Wat version of Splunk you are using ?

V
0 Karma

Richfez
SplunkTrust
SplunkTrust

Could you paste the search you are running again, only this time format it with the Code Sample button? I think a lot of your search got eaten by the editor.

0 Karma

renjith_nair
Legend

You can use the $job.resultCount$ inside the search tag or set a token based on this and use that later.

For reference : http://docs.splunk.com/Documentation/Splunk/latest/Viz/tokens#Search_event_elements_and_job_properti...

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...