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!

Industry Solutions for Supply Chain and OT, Amazon Use Cases, Plus More New Articles ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Enterprise Security Content Update (ESCU) | New Releases

In November, the Splunk Threat Research Team had one release of new security content via the Enterprise ...

Index This | Divide 100 by half. What do you get?

November 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...