Dashboards & Visualizations

How to pass token to dropdown panels when token is coming from another dashboard?

MeMilo09
Path Finder

Hi All,

I have two dashboards, dashboard 1 and dashboard 2. I have linked them. When clicking on host from a line chart from dashboard 1, dashboard 2 opens up and filters on the selected host from dashboard 1. So far, dashboard 2 shows the correct host on the multiselect input. The issue is that I somehow override the panels in dashboard 2 with those of dashboard 1.  It may be an issue with the token, since I have tok_host=$tok_host$ on both dashboard's 1 and 2, but I am not sure if that is causing the issue. Any advise is welcome.  Thanks in advance 

 

Dashboard 1
Input for multiselect:

<input type="multiselect" token="tok_host" searchWhenChanged="true">
      <label>Select Server (Multi Select)</label>
      <search>
        <query> (index=test_*_idx) |fields + host | stats values(host) as host | mvexpand host | rename host as tok_host  </query>
      </search>
      <prefix>host IN (</prefix>
      <valuePrefix></valuePrefix>
      <valueSuffix></valueSuffix>
      <delimiter> , </delimiter>
      <suffix>)</suffix>
      <choice value="*">All</choice>
      <fieldForLabel>tok_host</fieldForLabel>
      <fieldForValue>tok_host</fieldForValue>
    </input>

Linking the dashboard code:
 
<drilldown>
          <link target="_blank">/app/XYZ_Sun_Sys/Dashboard2?form.tok_host=$click.name2$</link>
        </drilldown>
Dashboard 2
Multiselect input code:
 <input type="multiselect" token="tok_host" searchWhenChanged="true">
      <label>Select Server</label>
      <search>
        <query>(index=text_idx)   |fields + host | stats values(host) as host | mvexpand host | rename host as tok_host</query>
        <earliest>$time_range.earliest$</earliest>
        <latest>$time_range.latest$</latest>
      </search>
      <fieldForLabel>Select Host</fieldForLabel>
      <fieldForValue>tok_host</fieldForValue>
      <choice value="*">All</choice>
      <delimiter> ,</delimiter>
      <default>*</default>
    </input>

Dashboard 2 code for panel 

  </fieldset>
  <row>
  <panel depends="$tok_host$">
      <title> First Panel - $tok_host$  </title>
      <single>
        <title>Space Avail</title>
        <search>
          <query>index=testing_idx  host=$tok_host$  |timechart span=10min avg(Speed) as speed | eval change=_time</query>

 

Labels (4)
Tags (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

It is not clear what the multi-select in dashboard 2 is supposed to be doing (it doesn't appear to be correct e.g. fieldForLabel and delimiter (without the prefix and suffix?) - why are you not using the same dropdown code as dashboard 1?), or what you mean by panels from dashboard 1 overriding dashboard 2. The drilldown you have in dashboard 1 will set the selection for the multi-select in dashboard 2.

View solution in original post

0 Karma

kumaranv
Loves-to-Learn Lots

How to pass token to a glass table from a dashboard ?

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

This seems like a different question - please can you raise it as such and give some more detail about what you are trying to do.

0 Karma

kumaranv
Loves-to-Learn Lots

I have a "Summary" glass table with "country" drop down and another "Country Detail" glass table with "country" drop down also. when drill down from "Summary" glass table to "Country Detail" glass table using "Link to custom URL" i want to pass country value and set it in "country" drop down of "Country Detail" glass table. I hope i made it clear. Thanks

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It is not clear what the multi-select in dashboard 2 is supposed to be doing (it doesn't appear to be correct e.g. fieldForLabel and delimiter (without the prefix and suffix?) - why are you not using the same dropdown code as dashboard 1?), or what you mean by panels from dashboard 1 overriding dashboard 2. The drilldown you have in dashboard 1 will set the selection for the multi-select in dashboard 2.

0 Karma

MeMilo09
Path Finder

@ITWhisperer I had the input forms match. Thank you for confirming my dashboard 1 code was correct, that was helpful. 

0 Karma
Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...