<?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 Re: makeresult token in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/makeresult-token/m-p/391198#M25668</link>
    <description>&lt;P&gt;@surekhasplunk, you dont need &lt;CODE&gt;makeresults&lt;/CODE&gt; and more over the search will throw an error. &lt;BR /&gt;
Try executing the search in a search window and see what you get. &lt;BR /&gt;
Just remove the &lt;CODE&gt;|makeresults&lt;/CODE&gt;  from your search and you should be getting the token set.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Makeresults"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Makeresults&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 25 May 2019 03:26:47 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2019-05-25T03:26:47Z</dc:date>
    <item>
      <title>makeresult token</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/makeresult-token/m-p/391195#M25665</link>
      <description>&lt;P&gt;I am making 5 tokens using below query :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;|makeresults |index=capaplan_wan_ibfs InOut="in"
    | eval Device_Interface = orig_host . ":" . Interface 
    | fields - orig_host Interface 
    | table Device_Interface  LoadDuration 
    | rex field=Device_Interface "^(?&amp;amp;lt;Device&amp;amp;gt;.*?):(?&amp;amp;lt;Interface&amp;amp;gt;.*)$" 
    | fields - Device_Interface | dedup Device | sort -LoadDuration | head 5 | table Device| transpose | rename "row 1" as device1  "row 2" as device2  "row 3" as device3  "row 4" as device4  "row 5" as device5
         &amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;-3mon&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;done&amp;gt;
          &amp;lt;set token="tokDevice1"&amp;gt;$result.device1$&amp;lt;/set&amp;gt;
          &amp;lt;set token="tokDevice2"&amp;gt;$result.device2$&amp;lt;/set&amp;gt;
          &amp;lt;set token="tokDevice3"&amp;gt;$result.device3$&amp;lt;/set&amp;gt;
          &amp;lt;set token="tokDevice4"&amp;gt;$result.device4$&amp;lt;/set&amp;gt;
          &amp;lt;set token="tokDevice5"&amp;gt;$result.device5$&amp;lt;/set&amp;gt;
        &amp;lt;/done&amp;gt;
       &amp;lt;/search&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now i want to use these tokens in my next panel query as input like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| mstats max(_value) as "Bits_in_sec" WHERE (metric_name="*in" ) AND (host=$tokDevice1$) by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But its not getting the input i.e. the token vaule is not getting passed. Pleasehelp&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 02:44:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/makeresult-token/m-p/391195#M25665</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2019-05-25T02:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: makeresult token</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/makeresult-token/m-p/391196#M25666</link>
      <description>&lt;P&gt;@surekhasplunk, kindly use the formatting (code sample) for readability.&lt;/P&gt;

&lt;P&gt;What's the use of &lt;CODE&gt;makeresults&lt;/CODE&gt; in your search?  Are you getting result for your search in your panel?&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 03:08:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/makeresult-token/m-p/391196#M25666</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-05-25T03:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: makeresult token</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/makeresult-token/m-p/391197#M25667</link>
      <description>&lt;P&gt;Hi @renjith.nair ,&lt;/P&gt;

&lt;P&gt;The use of makeresult is to get the top 5 devices and set them with a token value so that i can use it in my other panel query. And i want to keep the query result hidden as well. so using makeresults&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 03:16:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/makeresult-token/m-p/391197#M25667</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2019-05-25T03:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: makeresult token</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/makeresult-token/m-p/391198#M25668</link>
      <description>&lt;P&gt;@surekhasplunk, you dont need &lt;CODE&gt;makeresults&lt;/CODE&gt; and more over the search will throw an error. &lt;BR /&gt;
Try executing the search in a search window and see what you get. &lt;BR /&gt;
Just remove the &lt;CODE&gt;|makeresults&lt;/CODE&gt;  from your search and you should be getting the token set.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Makeresults"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Makeresults&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 03:26:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/makeresult-token/m-p/391198#M25668</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-05-25T03:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: makeresult token</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/makeresult-token/m-p/391199#M25669</link>
      <description>&lt;P&gt;Hi @surekhasplunk,&lt;/P&gt;

&lt;P&gt;Your search seems to be broken because you are using two generating clause in a row. Please remove &lt;CODE&gt;makeresults&lt;/CODE&gt; as follows :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;query&amp;gt;index=capaplan_wan_ibfs InOut="in"
 | eval Device_Interface = orig_host . ":" . Interface 
 | fields - orig_host Interface 
 | table Device_Interface  LoadDuration 
 | rex field=Device_Interface "^(?&amp;lt;Device&amp;gt;.*?):(?&amp;lt;Interface&amp;gt;.*)$" 
 | fields - Device_Interface | dedup Device | sort -LoadDuration | head 5 | table Device| transpose | rename "row 1" as device1  "row 2" as device2  "row 3" as device3  "row 4" as device4  "row 5" as device5
  &amp;lt;/query&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or if you really need to keep the results from &lt;CODE&gt;makeresults&lt;/CODE&gt; for some reason then you will need to use append:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;query&amp;gt;|makeresults |append [|index=capaplan_wan_ibfs InOut="in"]
 | eval Device_Interface = orig_host . ":" . Interface 
 | fields - orig_host Interface 
 | table Device_Interface  LoadDuration 
 | rex field=Device_Interface "^(?&amp;lt;Device&amp;gt;.*?):(?&amp;lt;Interface&amp;gt;.*)$" 
 | fields - Device_Interface | dedup Device | sort -LoadDuration | head 5 | table Device| transpose | rename "row 1" as device1  "row 2" as device2  "row 3" as device3  "row 4" as device4  "row 5" as device5
 &amp;lt;/query&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 07:11:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/makeresult-token/m-p/391199#M25669</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-25T07:11:01Z</dc:date>
    </item>
  </channel>
</rss>

