Archive
Highlighted

Drilldown to a specific panel on another dashboard.

Builder

Is it possible to drilldown to a specific panel on a dashboard. ?
how to do it ?

Tags (1)
0 Karma
Highlighted

Re: Drilldown to a specific panel on another dashboard.

SplunkTrust
SplunkTrust

Hi @jiaqya,

I think niketnilay's answer will help you. Can you please check link?

https://answers.splunk.com/answers/614375/how-to-drill-down-from-dashboard-to-filtered-repor.html#co...

0 Karma
Highlighted

Re: Drilldown to a specific panel on another dashboard.

Builder

Kamlesh, thanks for response, but this does not help me. What i am trying to do is , when i click a link on another dashbaord, its configured with drilldown to an url., which is again another dashboard. But the panel i want to go to is at the bottom of the dashboard. so i wanted to know if i can have a drill down which can directly take me to the panel ( ie bottom of the page )

i have been using form tokens for passing values to the next dashboard. but i dont know how to go to the specific panel...

0 Karma
Highlighted

Re: Drilldown to a specific panel on another dashboard.

Builder

So you want to auto scroll to the panel on same dashboard. I think you'll have to use html for that by bookmarking the panel and applying token at the same time.

0 Karma
Highlighted

Re: Drilldown to a specific panel on another dashboard.

Builder

Yes you are right, i want to directly scroll to that panel. do you have an example link of how i can do that. currently the page is not html...

0 Karma
Highlighted

Re: Drilldown to a specific panel on another dashboard.

SplunkTrust
SplunkTrust

Hi @jiaqya,

Well, I'm able to do it with Javascript.

Can you please try below example?

mytest.js

require([
     'underscore',
     'jquery',
     'splunkjs/mvc',
     'splunkjs/mvc/simplexml/ready!'
 ], function(_, $, mvc) {

$(document).ready(function () {
    var loadTarget = location.hash.replace('#','');
    var offset = 0;

    offset = $("#"+loadTarget).offset().top;

    $('html, body').animate({
        scrollTop: offset
    }, 550);
});
});

I have set id to my panel.

test_dashboard.xml

<dashboard script="mytest.js">
  <label>Test Dashboard</label>
  <row>
    <panel>
      <chart>
        <search>
          <query>index=_internal  | stats count as AA by sourcetype</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="charting.chart">pie</option>
        <option name="charting.drilldown">all</option>
      </chart>
    </panel>
  </row>
  <row>
    <panel>
      <chart>
        <search>
          <query>index=_internal  | stats count as AA by sourcetype</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="charting.chart">pie</option>
        <option name="charting.drilldown">all</option>
      </chart>
    </panel>
  </row>
  <row>
    <panel>
      <chart>
        <search>
          <query>index=_internal  | stats count as AA by sourcetype</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="charting.chart">pie</option>
        <option name="charting.drilldown">all</option>
      </chart>
    </panel>
  </row>
  <row>
    <panel>
      <chart>
        <search>
          <query>index=_internal  | stats count as AA by sourcetype</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="charting.chart">pie</option>
        <option name="charting.drilldown">all</option>
      </chart>
    </panel>
  </row>
  <row>
    <panel>
      <chart>
        <search>
          <query>index=_internal  | stats count as AA by sourcetype</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="charting.chart">pie</option>
        <option name="charting.drilldown">all</option>
      </chart>
    </panel>
  </row>
  <row>
    <panel id="mypanel">
      <title>Total ABC-1 Errors Last 4 Hours</title>
      <single>
        <search>
          <query>sourcetype=foo errorCode=1 OR errorCode=ABC-1 | stats dc(ip)</query>
        </search>
      </single>
    </panel>
  </row>
</dashboard>

On Drilldown code, pass your panel Id after #.
eg

http://SPLUNK_SERVER/en-GB/app/MY_APP/test_dashboard#mypanel

Well, I hope this will help you.

Thanks

Highlighted

Re: Drilldown to a specific panel on another dashboard.

Builder

Thanks Kamlesh, ill try this and get back to you

0 Karma
Highlighted

Re: Drilldown to a specific panel on another dashboard.

Builder

i didnt have to try above solution, our team decided to convert the panel into a new dashboard. so its easy now to redirect via drill down..

thanks everyone for the responses.

0 Karma
Highlighted

Re: Drilldown to a specific panel on another dashboard.

Splunk Employee
Splunk Employee

Thank you this is awesome!
This one works well without any params passed to the next dashboard.
Could you think of another method that would work for, like,

i.e)

      <link target="_blank">/app/splunk_health_monitoring/forwarder_test?name=$click.name$&value=$click.value$&panel=jumptoHere</link>
0 Karma
Highlighted

Re: Drilldown to a specific panel on another dashboard.

Observer

Precisely what I was looking for but with an option to set token value. @sylim_splunk please share if you found anything

0 Karma