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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...