@ITWhisperer I had the exact same thought and implemented the below code. [1] Here I tokenized the elements I needed from Dashboard panel (dashTok, dashUserId,dashCount,dashAvgTime,dashMaxTime) and used them in $customer_comment_report$ ad it works fine giving below results. But the issue with this approach is its good for one dashboard and its corresponding report. When i click on second dashboard, it doesnt append 2nd dashboard id, its count etc and its corresponding reports. <!-- Row displaying 2 Panels : DashboardId & Report ID-->
<row>
<panel>
<table>
<title>Dashboard performance</title> <!-- Panel to display dashboard ID. Once we click on a dashboardID it shows required data in customer_comment_da -->
<search>
<query>$input_index$ `logRecordType(D,R)` earliest=$earliest$ latest=$latest$ | stats count, count(eval(runTime > 2000)) as infoThresholdCount, count(eval(runTime * 1 > 2000)) as warnThresholdCount, count(eval(runTime * 1 * 1 > 5000)) as errorThresholdCount, avg(runTime) as averageRunTime, max(runTime) as maxRunTime, avg(cpuTime) as averageCpuTime, max(cpuTime) as maxCpuTime, avg(waitTime) as averageWaitTime, max(waitTime) as maxWaitTime by dashboardId, userId | eval averageRunTime = round(averageRunTime, 2) | sort -averageRunTime </query>
</search>
<option name="count">10</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">row</option>
<option name="rowNumbers">false</option>
<option name="wrap">true</option>
<drilldown target="_blank">
<eval token="earliest_str">$row.earliest_str$</eval>
<eval token="latest_str">$row.latest_str$</eval>
<eval token="earliest_str">$row.earliest$</eval>
<eval token="tempEarliest">$earliest$-19800</eval>
<!-- Temp converting IST to UTC -->
<eval token="earliestUTC">if(isnull($earliestUTC$), strftime($tempEarliest$,"%m/%d/%y %H:%M:%S") , $earliestUTC$)</eval>
<eval token="latest_str">$row.latest$</eval>
<eval token="tempLatest">$latest$-19800</eval>
<!-- Temp converting IST to UTC -->
<eval token="latestUTC">if(isnull($latestUTC$), strftime($tempLatest$,"%m/%d/%y %H:%M:%S"), $latestUTC$)</eval>
<set token="dashTok">$row.dashboardId$</set> <!-- tokenize dashboard components from panel 1 -->
<set token="dashUserId">$row.userId$</set>
<set token="dashCount">$row.count$</set>
<set token="dashAvgTime">$row.averageRunTime$</set>
<set token="dashMaxTime">$row.maxRunTime$</set> <!-- End of tokenize dashboard components from panel 1 -->
<!-- Code to display multiple rows data in template -->
<eval token="customer_comment_da">if(isnull($customer_comment_da$),"Dashboard ID : ".$row.dashboardId$."
User ID : ".$row.userId$."
Count : ".$row.count$."
Average runTime : ".$row.averageRunTime$." ms
Max runTime : ".$row.maxRunTime$." ms
",$customer_comment_da$."
Dashboard ID : ".$row.dashboardId$."
User ID : ".$row.userId$."
Count : ".$row.count$."
Average runTime : ".$row.averageRunTime$." ms
Max runTime : ".$row.maxRunTime$." ms
")</eval>
<!-- End Code to display multiple rows data in template -->
<!-- Panel that runs when we click on the dashboard id. We are using using $dashTok$ from above panel to run the below query -->
<set token="drilldown_display">block</set>
</drilldown>
</table>
</panel>
<panel>
<table>
<title>Reports based on dashboard ID</title>
<search>
<query>$input_index$ `logRecordType(D,R)` earliest=$earliest$ latest=$latest$ dashboardId=$dashTok$ | table reportId runTime | sort -runTime</query>
</search>
<option name="count">10</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">row</option>
<option name="refresh.display">progressbar</option>
<option name="rowNumbers">false</option>
<option name="wrap">true</option>
<option name="drilldown">row</option>
<drilldown target="_blank">
<eval token="earliest_str">$row.earliest_str$</eval>
<eval token="latest_str">$row.latest_str$</eval>
<eval token="earliest_str">$row.earliest$</eval>
<eval token="tempEarliest">$earliest$-19800</eval>
<!-- Temp converting IST to UTC -->
<eval token="earliestUTC">if(isnull($earliestUTC$), strftime($tempEarliest$,"%m/%d/%y %H:%M:%S") , $earliestUTC$)</eval>
<eval token="latest_str">$row.latest$</eval>
<eval token="tempLatest">$latest$-19800</eval>
<!-- Temp converting IST to UTC -->
<eval token="latestUTC">if(isnull($latestUTC$), strftime($tempLatest$,"%m/%d/%y %H:%M:%S"), $latestUTC$)</eval>
<!-- Storing top reportid using customer_comment_report token and displaying in the template -->
<eval token="customer_comment_report">if(isnull($customer_comment_report$),"<!-- Code to display multiple rows data in template -->DashboardId : ".$dashTok$."
Count : ".$dashCount$."
User ID : ".$dashUserId$."
Avg runTime : ".$dashAvgTime$."
Max runTime : ".$dashMaxTime$."
<br/>
Reports for the above dashboard consuming high runTime :
------------------------
Report ID runTime (ms)
------------------------
".$row.reportId$." ".$row.runTime$."
",$customer_comment_report$."
".$row.reportId$." ".$row.runTime$."
")
</eval>
<!-- End Code to display multiple rows data in template -->
<set token="drilldown_display">block</set>
</drilldown>
</table>
</panel>
</row>
<!-- below block shows template extracted from above queries -->
<row depends="$drilldown_display$">
<panel>
<!-- template with row data -->
<html>
<h1 class="SectionHeader">Case Updation Template</h1>
<div style="float:left; width:calc(95% - 100px);" class="pageInfo">
<pre>
Hi Team,
We have received alert for dashboards. Please see below fro more details:
Upon checking, we found below dashboards took high run time on an average:
$customer_comment_report$
Please review the above mentioned operations at your end.
Thanks,
Splunk Team
</pre>
</div>
</html>
</panel>
</row> [2] Coming to your approach you suggested, of bringing report ids from 2nd panel to customer_comment_da in 1st panel. How do i tokenize the top 3 or 4 rows of report id and append it with customer_comment_da token? Ideal output expected: [1] DashboardId : 01T5b0000004eST Count : 9 User ID : 00536532002Z2ov Avg runTime : 95860.33 ms Max runTime : 602874 ms Reports for the above dashboard consuming high runTime : ------------------------ Report ID runTime (ms) ------------------------ 00O5b0000099BUT 602874 00O5b0000099BLM 77054 00O5b0000099BTC 76588 00O5b0000099GUH 30119 [2] DashboardId : 01P5b0000004eST Count : 6 User ID : 00536500002Z2kl Avg runTime : 55720 ms Max runTime : 501324 ms Reports for the above dashboard consuming high runTime : ------------------------ Report ID runTime (ms) ------------------------ 00O5b0000066BUT 80052 00O5b0000066BLM 44520
... View more