Dashboards & Visualizations

How to join query for dashboard panels?

Splunk120379
New Member

I have two source , like source1 and source2 .
source1 has fields like, event, id, source1_total_time
source2 has fields like, id, source2_total_time

I am working on dashboard where first panel query is like ,

source=source1  |  stats count min(source1_total_time) as min_response_time,max(v) as max_response_time,avg(source1_total_time) as avg_response_time,perc95(source1_total_time) as perc95_response_time,range(source1_total_time) as range by  EVENT
| eval minimum=round(min_response_time, 0)." ms"
| eval average=round(avg_response_time, 0)." ms" 
| eval maximum=round(max_response_time, 0)." ms"
| eval perc95=round(perc95_response_time, 0)." ms"
| eval range=round(min_response_time, 0)." - ".round(min_response_time+range, 0)." ms" 
| sort - perc95_response_time
| fields - *_time

I am building second panel using event as drill down token as below,

  <set token="eventid">$row.EVENT$</set>
</drilldown>

My second panel query is like ,

 source=source1  EVENT="$eventid$" | join type=inner id [ search source=source2 ]   | eval TOTAL_TIME_TAKEN = tostring((source1_total_time - source2_total_time), "duration") | table EVENT  ID  source1_total_time, source2_total_time TOTAL_TIME_TAKEN _time

I am not getting the desired result with this. Here Expected is that, if the first panel gives 10 events count, when we click on that count second panel has to give me details about all that events with unique ids, event, the total time taken.

Could you please help me with this.

Thanks,

0 Karma

davidmills
Explorer

Hi, I'm looking to solve a similar join. Did you even find a resolution?

0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security(ES) 7.3 is approaching the end of support. Get ready for ...

Hi friends!    At Splunk, your product success is our top priority. With Enterprise Security (ES), we're here ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...