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

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Build resilience for the agentic era: Join us at Splunk Go San Jose

AI is changing how organizations build, operate, and secure digital services. As teams adopt AI agents and ...

Manage Edge Processor pipelines end to end with APIs

This guide uses the Data Management APIs to create an Edge Processor, onboard one instance, deploy a pipeline ...