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!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...