<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Which search commands allow you to display search property values in a table or dashboard? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Which-search-commands-allow-you-to-display-search-property/m-p/233486#M69322</link>
    <description>&lt;P&gt;Which search commands allow you to display search property values in a table or dashboard? I am referring specifically to  &lt;STRONG&gt;scanCount&lt;/STRONG&gt; and &lt;STRONG&gt;resultCount&lt;/STRONG&gt; . How can I add &lt;STRONG&gt;resultCount&lt;/STRONG&gt;, &lt;STRONG&gt;scanCount&lt;/STRONG&gt; to a table?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;BR /&gt;
Kyle&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jan 2017 21:53:46 GMT</pubDate>
    <dc:creator>kplatte</dc:creator>
    <dc:date>2017-01-09T21:53:46Z</dc:date>
    <item>
      <title>Which search commands allow you to display search property values in a table or dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Which-search-commands-allow-you-to-display-search-property/m-p/233486#M69322</link>
      <description>&lt;P&gt;Which search commands allow you to display search property values in a table or dashboard? I am referring specifically to  &lt;STRONG&gt;scanCount&lt;/STRONG&gt; and &lt;STRONG&gt;resultCount&lt;/STRONG&gt; . How can I add &lt;STRONG&gt;resultCount&lt;/STRONG&gt;, &lt;STRONG&gt;scanCount&lt;/STRONG&gt; to a table?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;BR /&gt;
Kyle&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 21:53:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Which-search-commands-allow-you-to-display-search-property/m-p/233486#M69322</guid>
      <dc:creator>kplatte</dc:creator>
      <dc:date>2017-01-09T21:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Which search commands allow you to display search property values in a table or dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Which-search-commands-allow-you-to-display-search-property/m-p/233487#M69323</link>
      <description>&lt;P&gt;I don't believe there is a search command provides all those properties. However, in Splunk 6.3+ onwards, the panel &lt;CODE&gt;&amp;lt;search&amp;gt;&lt;/CODE&gt; element provides event handler which exposes those job properties. So, you can use event handle which have access to job properties (&lt;CODE&gt;&amp;lt;progress&amp;gt;&lt;/CODE&gt; and &lt;CODE&gt;&amp;lt;done&amp;gt;&lt;/CODE&gt;), then you can use a eval/set option to get those job properties to a token that can be used to display the same elsewhere (not in the search result, but to a label/title/html).&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.1/Viz/EventHandlerReference#Search_event_handlers"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.1/Viz/EventHandlerReference#Search_event_handlers&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.1/Viz/tokens#Search_event_elements_and_job_properties"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.1/Viz/tokens#Search_event_elements_and_job_properties&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 23:28:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Which-search-commands-allow-you-to-display-search-property/m-p/233487#M69323</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-09T23:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Which search commands allow you to display search property values in a table or dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Which-search-commands-allow-you-to-display-search-property/m-p/233488#M69324</link>
      <description>&lt;P&gt;Here ya go example code at the bottom.&lt;/P&gt;

&lt;P&gt;Explanation.&lt;BR /&gt;
Create an eval via a progress tag.&lt;BR /&gt;
Then insert that new eval somewhere on your dashboard.&lt;/P&gt;

&lt;P&gt;Any of the job tokens can be grabbed in the same manner.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Token Example&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;search id="search_logic"&amp;gt;
        &amp;lt;query&amp;gt;index=_internal  sourcetype=splunkd|  top sourcetype&amp;lt;/query&amp;gt;
                  &amp;lt;earliest&amp;gt;-1m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;

        &amp;lt;progress&amp;gt;
          &amp;lt;eval token="scancount"&amp;gt;$job.scanCount$&amp;lt;/eval&amp;gt;
          &amp;lt;eval token="resultcount"&amp;gt;$job.resultCount$&amp;lt;/eval&amp;gt;
        &amp;lt;/progress&amp;gt;
      &amp;lt;/search&amp;gt;

      &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;Top sourcetypes for index=_internal&amp;lt;/title&amp;gt;
        &amp;lt;search base="search_logic" /&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;bar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
      &amp;lt;html&amp;gt;
          &amp;lt;h3&amp;gt;Scancount : $scancount$&amp;lt;/h3&amp;gt;
          &amp;lt;h3&amp;gt;resultcount : $resultcount$&amp;lt;/h3&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jan 2017 04:33:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Which-search-commands-allow-you-to-display-search-property/m-p/233488#M69324</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2017-01-10T04:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Which search commands allow you to display search property values in a table or dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Which-search-commands-allow-you-to-display-search-property/m-p/233489#M69325</link>
      <description>&lt;P&gt;Hi kplatte,&lt;BR /&gt;
if you want to add to your table a column with the total count of events you could run something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | eventstats count AS cnt | stats values(cnt) AS cnt count by host 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if instead you want to have the number of events outside the panel (e.g. in the Panel's Title), you have to insert in your search something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;progress&amp;gt;
   &amp;lt;eval token="scancount"&amp;gt;$job.scanCount$&amp;lt;/eval&amp;gt;
   &amp;lt;eval token="resultcount"&amp;gt;$job.resultCount$&amp;lt;/eval&amp;gt;
&amp;lt;/progress&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and use the token.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 09:17:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Which-search-commands-allow-you-to-display-search-property/m-p/233489#M69325</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-01-10T09:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Which search commands allow you to display search property values in a table or dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Which-search-commands-allow-you-to-display-search-property/m-p/233490#M69326</link>
      <description>&lt;P&gt;@kplatte - Looks like you have a few possible solutions to your question. If one of them provided a working solution, please don't forget to click "Accept" below the best answer to resolve this post. If you still need help, please leave a comment. Don’t forget to upvote anything that was helpful too. Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jan 2017 01:02:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Which-search-commands-allow-you-to-display-search-property/m-p/233490#M69326</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2017-01-22T01:02:20Z</dc:date>
    </item>
  </channel>
</rss>

