Dashboards & Visualizations

Drill down cell level does not work

sushmitha_mj
Communicator

I am trying to pass two values from one form to another.
Here is my query :

...| timechart span=1h count by country_code

I want to pass the time value and the individual country code to the drill down dashboard. The time value gets passed but not the country code value. Here is my drill down link

      <link>
        <![CDATA[/app/Timeout_Reports/time_details?form.country_code=$country_code$&form._earliest=$e$&form._latest=$le$]]>
        <option name="dataOverlayMode">none</option>
      </link>

On the drilldown dashboard I have a input fieldset for the country code.

<input type="dropdown" token="country_code" searchWhenChanged="true">
  <label>Country Code</label>
  <search>
    <query>... | eval country_code=substr(server_name,1,2) | where country_code=$country_code$ |stats count by country_code  </query>
  </search>
  <fieldForLabel>country_code</fieldForLabel>
  <fieldForValue>country_code</fieldForValue>
  </input>

I am then passing it to the search query in the drilldown dashboard.

... | eval country_code=substr(server_name,1,2)| where country_code=$country_code$ | table _time, server_name, country_code, desc, type
$form._earliest$
$form._latest$

The time value is passed but not the country code. Not sure what is wrong

Tags (2)
0 Karma
1 Solution

jkat54
SplunkTrust
SplunkTrust

You can use $row.country_code$, $row.server_name$, etc. See the example below from: http://docs.splunk.com/Documentation/Splunk/6.4.2/Viz/Understandbasictableandchartdrilldownactions#D...

Just make sure to include the <option name="drilldown">row</option>

<dashboard>
  <label>Dynamic Drilldown</label>
  <row>
    <panel>
      <table>
        <search>
          <query>index="_internal" | chart count by sourcetype | sort sourcetype</query>
          <earliest>-7d@h</earliest>
          <latest>now</latest>
        </search>
        <drilldown>
          <link target="_blank">
            /apps/MyApp/drilldown_dynamic_target_form?form.src_type_tok=$row.sourcetype$
          </link>
        </drilldown>
        <option name="drilldown">row</option>
      </table>
    </panel>
  </row>
</dashboard>

View solution in original post

0 Karma

jkat54
SplunkTrust
SplunkTrust

You can use $row.country_code$, $row.server_name$, etc. See the example below from: http://docs.splunk.com/Documentation/Splunk/6.4.2/Viz/Understandbasictableandchartdrilldownactions#D...

Just make sure to include the <option name="drilldown">row</option>

<dashboard>
  <label>Dynamic Drilldown</label>
  <row>
    <panel>
      <table>
        <search>
          <query>index="_internal" | chart count by sourcetype | sort sourcetype</query>
          <earliest>-7d@h</earliest>
          <latest>now</latest>
        </search>
        <drilldown>
          <link target="_blank">
            /apps/MyApp/drilldown_dynamic_target_form?form.src_type_tok=$row.sourcetype$
          </link>
        </drilldown>
        <option name="drilldown">row</option>
      </table>
    </panel>
  </row>
</dashboard>
0 Karma

sushmitha_mj
Communicator

I had row already in my code. But the document helped. It worked. Thanks

Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...