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!

Exciting News: The AppDynamics Community Joins Splunk!

Hello Splunkers,   I’d like to introduce myself—I’m Ryan, the former AppDynamics Community Manager, and I’m ...

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...