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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...