Splunk Search

How to combine two different search results in a single visualization?

kenvanderheyden
Path Finder

Hello,

I'm having trouble combining two different search results, from different source type into one visualization.

These are the two search strings:

index=* sourcetype=typeA| stats count by date_year | eventstats avg(count) | rename count as "total", avg(count) as "global average"
index=* sourcetype=otherTypeB| stats count by date_year | eventstats avg(count) | rename count as "total", avg(count) as "global average"

Both searches result in a line.
I would like to see both in one visualization, so the correlation between the events if there is one, becomes visible.

Tried using a join:

index=* sourcetype=typeA| join date_year [search sourcetype=otherTypeB] | stats count by date_year | eventstats avg(count)

But this results in having a single line.
Not sure how to proceed from here on.

Regards,
Ken.

0 Karma
1 Solution

kenvanderheyden
Path Finder

Found a simple solution:

index=* sourcetype=type1 OR sourcetype=otherTypeB
| timechart count(eval(sourcetype=="type1")) , count(eval(sourcetype=="otherTypeB")) 

View solution in original post

0 Karma

kenvanderheyden
Path Finder

Found a simple solution:

index=* sourcetype=type1 OR sourcetype=otherTypeB
| timechart count(eval(sourcetype=="type1")) , count(eval(sourcetype=="otherTypeB")) 
0 Karma
Get Updates on the Splunk Community!

Dashboard Studio Challenge - Learn New Tricks, Showcase Your Skills, and Win Prizes!

Reimagine what you can do with your dashboards. Dashboard Studio is Splunk’s newest dashboard builder to ...

Introducing Edge Processor: Next Gen Data Transformation

We get it - not only can it take a lot of time, money and resources to get data into Splunk, but it also takes ...

Take the 2021 Splunk Career Survey for $50 in Amazon Cash

Help us learn about how Splunk has impacted your career by taking the 2021 Splunk Career Survey. Last year’s ...