Splunk Search

Combine two search queries to display count

thenormalone
Path Finder

One of the search queries provides a TimerName and an ID as a field. Another search provides the TYPE of the ID as a field. I need to display the number of times the timerName gets called for the different type of these ids.


How do I create a search which extracts the timerName and ID from the first search and the TYPE from the second search (using the ID from the first search) and displays the count of the TimerName called for the different TYPEs?

 

Labels (3)
0 Karma

peter_krammer
Communicator

Maybe something like this? 

(<YOUR FIRST SEARCH>) OR (<YOUR SECOND SEARCH>)
| eventstats values(TYPE) as  TYPE by ID
| stats count by ID, TYPE, timerName
0 Karma

thenormalone
Path Finder

so I have one of the searches which provides the timer information (which includes the timerName and Id) and the other search is just a string which contains id and type. I need to combine these two searches to produce count by timerName and type.

 

I tried appending the 2 searches and doing a count but that did not help.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You could try one search that returns events from both sources, then stats count by timername, id, type.

0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...