Dashboards & Visualizations

Splunk 6.3 New Search Results Setter

ksi_custr
Explorer

Hi All,

Has anybody tried to use the New Search Results setter in 6.3? I am trying to pass the search field results on a token however it is not working. Based on the splunk docs, just use $result.[fieldname]$. Below is my sample xml code.

<dashboard>
  <label>Search Result Setter</label>
  <description>Set tokens from the search manager to embed throughout the page.</description>
  <row>
    <panel>
      <title>Test</title>
      <table>
        <title>First sourcetype ($first_sourcetype$)</title>
        <search>
          <query>index=_internal |  top sourcetype</query>
          <earliest>-60m</earliest>
          <latest>now</latest>
          <progress>
            <set token="first_sourcetype">$result.sourcetype$</set>
          </progress>
          <cancelled>
            <unset token="first_sourcetype"></unset>
          </cancelled>
        </search>
        <option name="charting.chart">bar</option>
        <option name="charting.legend.placement">none</option>
        <option name="wrap">true</option>
        <option name="rowNumbers">false</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
      </table>
    </panel>
  </row>
</dashboard>

Thanks,

0 Karma

piUek
Path Finder

Please refer to the http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML - there is no cancelled tag there. Check the below code, which sets the token as the search finalizes (finalized).

<dashboard>
  <label>Search Result Setter</label>
  <description>Set tokens from the search manager to embed throughout the page.</description>
  <row>
    <panel>
      <title>Test</title>
      <table>
        <title>First sourcetype ($first_sourcetype$)</title>
        <search>
          <query>index=_internal | top sourcetype</query>
          <earliest>-60m</earliest>
          <latest>now</latest>
          <progress>
            <set token="first_sourcetype">$result.sourcetype$</set>
          </progress>
          <finalized>
            <set token="first_sourcetype">$result.sourcetype$</set>
          </finalized>
        </search>
        <option name="charting.chart">bar</option>
        <option name="charting.legend.placement">none</option>
        <option name="wrap">true</option>
        <option name="rowNumbers">false</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
        <option name="count">10</option>
      </table>
    </panel>
  </row>
</dashboard>

rakesh_498115
Motivator

Hi PiUek,

Can we refer to all the the rows in the search results instead of only a first row ??

is this is possible in Splunk ??

thanks,
Rakesh.

0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco &#43; Splunk! We’ve ...