<?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: How to create alternative for subsearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624129#M216981</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;, I tried yor suggestion but I get the error:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error in 'eval' command: Fields cannot be assigned a boolean result. Instead, try if([bool expr], [expr], [expr]).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My example search was simplified for several reasons, is there a chance I use illegal characters or something?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Dec 2022 12:40:52 GMT</pubDate>
    <dc:creator>Mike6960</dc:creator>
    <dc:date>2022-12-13T12:40:52Z</dc:date>
    <item>
      <title>How to create alternative for subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624121#M216975</link>
      <description>&lt;P&gt;I have a search with a subsearch. I run into the limitations of the maximum results (50.000)&lt;/P&gt;
&lt;P&gt;Now Ia m trying to figure out to rebuild my search but I am stuck. Can anyone guide to the right direction?&lt;/P&gt;
&lt;P&gt;My search now :&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;lt;&amp;gt;&amp;nbsp;&lt;/SPAN&gt;index=TEST&lt;BR /&gt;| search logger="success - Metadata:*"&lt;BR /&gt;[ search index=TEST&lt;BR /&gt;| search logger="Response: OK]"&lt;BR /&gt;| fields message.messageId]&lt;BR /&gt;| stats dc(message.messageId)&amp;lt;/&amp;gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 15:15:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624121#M216975</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2022-12-13T15:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to create alternative for subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624126#M216978</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/72784"&gt;@Mike6960&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;at first use&amp;nbsp; the search command after the main search only if you have some trasformation in the middle to use in the secondary search so you can have quicker searches.&lt;/P&gt;&lt;P&gt;then you have to find some value to identify differences.&lt;/P&gt;&lt;P&gt;If I correctly understood, you have to filter the results of the main search with the ones of the secondaryand you want only the message.messageId where there are both the logger values, is it correct?&lt;/P&gt;&lt;P&gt;in this case you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=TEST (logger="success - Metadata:*" OR logger="Response: OK")
| eval kind=if(logger="Response: OK",logger="Response: OK","success - Metadata")
| stats dc(kind) AS kind_count values(logger) AS logger BY message.messageId
| where kind_count=2&lt;/LI-CODE&gt;&lt;P&gt;please see my approach and adapt it to your need.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 12:17:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624126#M216978</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-13T12:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to create alternative for subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624129#M216981</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;, I tried yor suggestion but I get the error:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error in 'eval' command: Fields cannot be assigned a boolean result. Instead, try if([bool expr], [expr], [expr]).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My example search was simplified for several reasons, is there a chance I use illegal characters or something?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 12:40:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624129#M216981</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2022-12-13T12:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to create alternative for subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624132#M216984</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/72784"&gt;@Mike6960&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;sorry miscopy error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=TEST (logger="success - Metadata:*" OR logger="Response: OK")
| eval kind=if(logger="Response: OK","Response: OK","success - Metadata")
| stats dc(kind) AS kind_count values(logger) AS logger BY message.messageId
| where kind_count=2&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 13:11:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624132#M216984</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-13T13:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create alternative for subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624136#M216985</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; , thanks the error is now gone. But I get no results which is strange. I am gonna try to look what is causing this.&lt;/P&gt;&lt;P&gt;Maybe I should use 'transaction' because there are multiple kind of values for the logger not just the two&lt;/P&gt;&lt;P&gt;I need the events that are in both&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 13:39:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624136#M216985</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2022-12-13T13:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to create alternative for subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624147#M216991</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; I think its because of the asterix I use in the logger. I read that this is not supported in the evalfunction....&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 14:56:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624147#M216991</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2022-12-13T14:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create alternative for subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624158#M216993</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/72784"&gt;@Mike6960&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;maybe the problem is the field message.messageId, rename it or use quotes:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=TEST (logger="success - Metadata:*" OR logger="Response: OK")
| rename message.messageId AS messageId
| eval kind=if(logger="Response: OK","Response: OK","success - Metadata")
| stats dc(kind) AS kind_count values(logger) AS logger BY messageId
| where kind_count=2&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 15:48:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-alternative-for-subsearch/m-p/624158#M216993</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-13T15:48:46Z</dc:date>
    </item>
  </channel>
</rss>

