<?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: click a table using converttointention in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104402#M27049</link>
    <description>&lt;P&gt;Above trick did'nt work. however I found a work around. The converttointention always will be applied just before the reporting command. So use any possible reporting command, where the intention needs to be applied.&lt;/P&gt;

&lt;P&gt;As I said the above search string was a sample. here is a near actual one.&lt;/P&gt;

&lt;P&gt;index="service_monitor"  | delta web_get_requests as delta_web_get p=1 | eval abs_web_get=abs(delta_web_get) | stats max(abs_web_get) as Web_get_req sparkline(max(abs_web_get)) as "Trend Web_get_req"&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 13:12:36 GMT</pubDate>
    <dc:creator>KarunK</dc:creator>
    <dc:date>2020-09-28T13:12:36Z</dc:date>
    <item>
      <title>click a table using converttointention</title>
      <link>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104397#M27044</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I am  creating a dashboard with a table, which when clicked will open another chart in the same dashboard depending on the click value. I am using a covertTointention for this. But this not behaving as i wanted it to be. Following is the setting i am using.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="Search" layoutPanel="panel_row2_col1" autoRun="True"&amp;gt;
   &amp;lt;param name="search"&amp;gt;| inputlookup address  | stats values(address) as device_ip by hostname location model | sort hostname&amp;lt;/param&amp;gt;
   &amp;lt;module name="JobProgressIndicator" /&amp;gt;
   &amp;lt;module name="EnablePreview"&amp;gt;
      &amp;lt;param name="enable"&amp;gt;True&amp;lt;/param&amp;gt;
      &amp;lt;param name="display"&amp;gt;False&amp;lt;/param&amp;gt;
      &amp;lt;module name="Paginator"&amp;gt;
         &amp;lt;param name="count"&amp;gt;25&amp;lt;/param&amp;gt;
         &amp;lt;param name="entityName"&amp;gt;results&amp;lt;/param&amp;gt;
         &amp;lt;param name="maxPages"&amp;gt;10&amp;lt;/param&amp;gt;
         &amp;lt;module name="SimpleResultsTable"&amp;gt;
            &amp;lt;param name="drilldown"&amp;gt;row&amp;lt;/param&amp;gt;
            &amp;lt;param name="entityName"&amp;gt;results&amp;lt;/param&amp;gt;
            &amp;lt;module name="HiddenSearch" layoutPanel="panel_row2_col2"&amp;gt;
               &amp;lt;param name="search"&amp;gt;index="service_monitor"  | stats max(cpu_avg) AS "CPU Usage (Avg)", sparkline(max(cpu_avg)) as "Trend CPU Usage (Avg)"&amp;lt;/param&amp;gt;
               &amp;lt;module name="ConvertToIntention"&amp;gt;
                  &amp;lt;param name="intention"&amp;gt;
                     &amp;lt;param name="name"&amp;gt;addterm&amp;lt;/param&amp;gt;
                     &amp;lt;param name="arg"&amp;gt;
                        &amp;lt;param name="hostname"&amp;gt;$click.value$&amp;lt;/param&amp;gt;
                     &amp;lt;/param&amp;gt;
                  &amp;lt;/param&amp;gt;
                  &amp;lt;module name="SimpleResultsHeader" layoutPanel="panel_row2_col2"&amp;gt;
                     &amp;lt;param name="entityName"&amp;gt;results&amp;lt;/param&amp;gt;
                     &amp;lt;param name="headerFormat"&amp;gt;CPU Info in percentage.&amp;lt;/param&amp;gt;
                  &amp;lt;/module&amp;gt;
                  &amp;lt;module name="JobProgressIndicator" /&amp;gt;
                  &amp;lt;module name="SimpleResultsTable" /&amp;gt;
               &amp;lt;/module&amp;gt;
            &amp;lt;/module&amp;gt;
         &amp;lt;/module&amp;gt;
      &amp;lt;/module&amp;gt;
   &amp;lt;/module&amp;gt;
&amp;lt;/module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I run this, the intention which is hostname="blash" will only be applied after the hidden search, like below&lt;/P&gt;

&lt;P&gt;index="service_monitor"  | stats max(cpu_avg) AS "CPU Usage (Avg)", sparkline(max(cpu_avg)) as "Trend CPU Usage (Avg)" &lt;STRONG&gt;| search *hostname="blash"&lt;/STRONG&gt;*&lt;/P&gt;

&lt;P&gt;But I am looking for something like below.&lt;/P&gt;

&lt;P&gt;index="service_monitor" &lt;STRONG&gt;&lt;EM&gt;hostname="blash"&lt;/EM&gt;&lt;/STRONG&gt; | stats max(cpu_avg) AS "CPU Usage (Avg)", sparkline(max(cpu_avg)) as "Trend CPU Usage (Avg)"&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Note: Please disregard the search above. Its just an example to show what i am trying to do.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;How can I achieve this ? Any advice ?&lt;/P&gt;

&lt;P&gt;Thanks in Advance.&lt;/P&gt;

&lt;P&gt;KK&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:12:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104397#M27044</guid>
      <dc:creator>KarunK</dc:creator>
      <dc:date>2020-09-28T13:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: click a table using converttointention</title>
      <link>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104398#M27045</link>
      <description>&lt;P&gt;You can try something like this, instead of the convertToIntention&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="Search" layoutPanel="panel_row2_col2"&amp;gt;
  &amp;lt;param name="search"&amp;gt;index="service_monitor" hostname=$click.value$ | stats max(cpu_avg) AS "CPU Usage (Avg)", sparkline(max(cpu_avg)) as "Trend CPU Usage (Avg)"&amp;lt;/param&amp;gt;
&amp;lt;/module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Jan 2013 17:52:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104398#M27045</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2013-01-30T17:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: click a table using converttointention</title>
      <link>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104399#M27046</link>
      <description>&lt;P&gt;You'll have to play around with the different $click.value$ options to get the correct column value from the row the user is clicking on.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2013 17:54:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104399#M27046</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2013-01-30T17:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: click a table using converttointention</title>
      <link>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104400#M27047</link>
      <description>&lt;P&gt;Well you're already using Sideview Utils because you're using the Sideview Search module up at the top. So it's a little strange that you're still using the intentions system here at all.    Sideview utils adds a lot of improvements and one of the bigger ones is that you pretty much don't have to use or even think about intentions anymore. &lt;/P&gt;

&lt;P&gt;I think &lt;EM&gt;if&lt;/EM&gt; you were to stick with using intentions, there's also a problem that you're using the addterm intention, whereas here you probably need the stringreplace intention.   the addterm here is just going to tack a &lt;CODE&gt;hostname="foo"&lt;/CODE&gt; onto the end of your stats clause I think. &lt;/P&gt;

&lt;P&gt;But the best answer I think is to more fully utilize the Sideview modules.  Here's the same config but partially rewritten.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="Search" layoutPanel="panel_row2_col1" autoRun="True"&amp;gt;
  &amp;lt;param name="search"&amp;gt;| inputlookup address  | stats values(address) as device_ip by hostname location model | sort hostname&amp;lt;/param&amp;gt;

  &amp;lt;module name="JobProgressIndicator" /&amp;gt;

  &amp;lt;module name="EnablePreview"&amp;gt;
    &amp;lt;param name="enable"&amp;gt;True&amp;lt;/param&amp;gt;
    &amp;lt;param name="display"&amp;gt;False&amp;lt;/param&amp;gt;
  &amp;lt;/module&amp;gt; 

  &amp;lt;module name="Pager"&amp;gt;
    &amp;lt;param name="count"&amp;gt;25&amp;lt;/param&amp;gt;

    &amp;lt;module name="SimpleResultsTable"&amp;gt;
      &amp;lt;param name="drilldown"&amp;gt;row&amp;lt;/param&amp;gt;
      &amp;lt;param name="entityName"&amp;gt;results&amp;lt;/param&amp;gt;

      &amp;lt;module name="Search" layoutPanel="panel_row2_col2"&amp;gt;
        &amp;lt;param name="search"&amp;gt;index="service_monitor" $click.searchTerms$ | stats max(cpu_avg) AS "CPU Usage (Avg)", sparkline(max(cpu_avg)) as "Trend CPU Usage (Avg)"&amp;lt;/param&amp;gt;

        &amp;lt;module name="HTML"&amp;gt;
          &amp;lt;param name="html"&amp;gt;&amp;lt;![CDATA[
          &amp;lt;h3&amp;gt;CPU Info in percentage.&amp;lt;/h3&amp;gt;
          ]]&amp;gt;&amp;lt;/param&amp;gt;
        &amp;lt;/module&amp;gt;
        &amp;lt;module name="JobProgressIndicator" /&amp;gt;
        &amp;lt;module name="SimpleResultsTable" /&amp;gt;
      &amp;lt;/module&amp;gt;
    &amp;lt;/module&amp;gt;
  &amp;lt;/module&amp;gt;
&amp;lt;/module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Jan 2013 22:23:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104400#M27047</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-01-30T22:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: click a table using converttointention</title>
      <link>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104401#M27048</link>
      <description>&lt;P&gt;Thanks mate. It worked. Sideviewutil rocks !!!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2013 23:27:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104401#M27048</guid>
      <dc:creator>KarunK</dc:creator>
      <dc:date>2013-01-30T23:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: click a table using converttointention</title>
      <link>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104402#M27049</link>
      <description>&lt;P&gt;Above trick did'nt work. however I found a work around. The converttointention always will be applied just before the reporting command. So use any possible reporting command, where the intention needs to be applied.&lt;/P&gt;

&lt;P&gt;As I said the above search string was a sample. here is a near actual one.&lt;/P&gt;

&lt;P&gt;index="service_monitor"  | delta web_get_requests as delta_web_get p=1 | eval abs_web_get=abs(delta_web_get) | stats max(abs_web_get) as Web_get_req sparkline(max(abs_web_get)) as "Trend Web_get_req"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:12:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104402#M27049</guid>
      <dc:creator>KarunK</dc:creator>
      <dc:date>2020-09-28T13:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: click a table using converttointention</title>
      <link>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104403#M27050</link>
      <description>&lt;P&gt;Usually intention will be applied as below.&lt;/P&gt;

&lt;P&gt;index="cds_service_monitor_engine"  | delta web_get_requests as delta_web_get p=1 | eval abs_web_get=abs(delta_web_get) | search hostname="blash" | stats max(abs_web_get) as Web_get_req sparkline(max(abs_web_get)) as "Trend Web_get_req"&lt;/P&gt;

&lt;P&gt;By using the reporting command table, intention will move. &lt;/P&gt;

&lt;P&gt;index="cds_service_monitor_engine"  hostname="blash" | table web_get_requests  | delta web_get_requests as delta_web_get p=1 | eval abs_web_get=abs(delta_web_get)   | stats max(abs_web_get) as Web_get_req sparkline(max(abs_web_get)) as "Trend Web_get_req"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:12:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104403#M27050</guid>
      <dc:creator>KarunK</dc:creator>
      <dc:date>2020-09-28T13:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: click a table using converttointention</title>
      <link>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104404#M27051</link>
      <description>&lt;P&gt;Great!   I should add that the $click.searchTerms$ key there -- I think that's only in relatively recent copies of Sideview Utils.  If you only have the old version that's on Splunkbase you'll have to use the older key - $click.fields.host$,  or the legacy splunk key = $click.value$.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2013 00:33:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/click-a-table-using-converttointention/m-p/104404#M27051</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-01-31T00:33:12Z</dc:date>
    </item>
  </channel>
</rss>

