Splunk Search

How to create a drilldown for a single value chart to display a timechart panel?

dbcase
Motivator

Hi,

I have a single value chart that shows the count of successful logins for x period of time. I'd like to be able to click on the number and display a timechart panel that shows the login ID and when they logged in. Is this possible?

The existing query I have is:

index=cox sourcetype=wls_managedserver |rex field=message_text "X-login:\s(?< Login >[^\s\:;]+)"|timechart span=1hr count(Login) as "Login Count"

This works just fine. Just having trouble defining a subsequent drilldown on a dashboard

0 Karma
1 Solution

somesoni2
Revered Legend
0 Karma

dbcase
Motivator

Thanks! That gets very close. Since I'm not especially skilled at XML I think I need to modify this line

< option name="linkView" >YourSecondDashboard< /option >

But I don't know what I need to modify it to in order to call an in dashboard, not visible (got this one) panel.

0 Karma

somesoni2
Revered Legend

I think you're looking for an in-page drilldown ( the timechart to be shown on the same dashboard), so try like this

<row>
   <panel>
      <single>
         <title>Single Value Drilldown</title>
         <search>
           <query>index=_internal | stats count</query>
           <earliest>$timerange.earliest$</earliest>
           <latest>$timerange.latest$</latest>
         </search>
         <option name="drilldown">all</option>
         <option name="afterLabel">Click Here</option>
         <option name="underLabel">OR Click Here</option>
         <option name="linkFields">underlabel, afterlabel</option>
         <drilldown>
            <set  token="showtimechart">y</set>
         <drilldown>
       </single>
   </panel>
</row>
<row>
   <panel depends="$showtimechart$">
      <chart>
         <title>Single Value Drilldown</title>
         <search>
           <query>Your timechart search</query>
           <earliest>$timerange.earliest$</earliest>
           <latest>$timerange.latest$</latest>
         </search>
         ----other options----
       </chart >
   </panel>
</row>

dbcase
Motivator

Thanks somesoni2!

Worked great!!!! Had to add < /drilldown> but other than that it did exactly what was needed! Thank you!!!

0 Karma

s2_splunk
Splunk Employee
Splunk Employee

I recommend you download the Splunk 6.x Dashboard examples app and take a look at the single value drilldown example in there. That should get you where you want to go.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...