Splunk Search

Join and chart events from 2 log files with common field value but not lables.

Cuyose
Builder

I see a ton of these type questions, but none seem to pertain to what I am doing or I just dont understand them.

I have 2 sourcetype that have a common ID in the events,
sourcetypeA with RequestId
sourcetypeB with requestId

What I need to do is timechart by a field that only occurs in sourcetypeB but only when the corresponding request Id in sourcetypeA has a particular field value.

0 Karma

MuS
Legend

Hi Cuyose,

Take a look at this answer http://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-joi... which also includes an example what you're trying to do. In a nutshell try something like this:

sourcetypeA OR sourcetypeB | eventstats count by RequestId requestId anyothervalue | timechart count by field where RequestId > "5"

This will only timechart events with field events if RequestId is over 5. Be reminded this is out of my head and un-tested, so you maybe need to tweak it.

cheers, MuS

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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