<?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 use subsearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145879#M40705</link>
    <description>&lt;P&gt;sorry for delay response, I have done this query which I asked using splunk documentation. Now i am getting results what I expected&lt;/P&gt;

&lt;P&gt;Thank  you&lt;/P&gt;</description>
    <pubDate>Thu, 26 Feb 2015 08:33:36 GMT</pubDate>
    <dc:creator>Laya123</dc:creator>
    <dc:date>2015-02-26T08:33:36Z</dc:date>
    <item>
      <title>How to use subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145872#M40698</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;please help me to use subsearch,&lt;/P&gt;

&lt;P&gt;I have a main search query like&lt;/P&gt;

&lt;P&gt;index=A host=B cs_method="GET" cst="&lt;EM&gt;XXX&lt;/EM&gt;" | where isnull(ksid) and isnotnull(i_p) | stats c(_raw) by i_p&lt;/P&gt;

&lt;P&gt;result of above query is &lt;BR /&gt;
i_p                                c(_raw)&lt;BR /&gt;
CD                                       3&lt;BR /&gt;
CW2                                  1&lt;BR /&gt;
DYLA                                     3&lt;BR /&gt;
ABC12                                    7&lt;BR /&gt;
XYZ31                                  34&lt;BR /&gt;
jjjwwgga                           39&lt;BR /&gt;
ngrisoew                           40&lt;BR /&gt;
rtucw                                 43&lt;BR /&gt;
Poeyt                                 15  &lt;/P&gt;

&lt;P&gt;meaning of the above output is, the above i_p s are not using  secuirty check for some ids (each i_p is having their respective number of ids which is not using security check for example i_p of ABC12 for this i_p 7 IDs are not using security check)&lt;/P&gt;

&lt;P&gt;I want to take the above i_p and check how many are using securitycheck and how many are not using security check&lt;/P&gt;

&lt;P&gt;my output will be like&lt;/P&gt;

&lt;P&gt;CD                                       3                      123fgs               No                  2&lt;BR /&gt;
                                                                         1456mk             No                  1&lt;BR /&gt;
                                                                         674hjn              Yes                  1&lt;BR /&gt;
                                                                         453bcd              Yes                  1&lt;/P&gt;

&lt;P&gt;CW2                                  1&lt;BR /&gt;
DYLA                                     3&lt;BR /&gt;
ABC12                                    7&lt;BR /&gt;
XYZ31                                  34&lt;BR /&gt;
jjjwwgga                           39&lt;BR /&gt;
ngrisoew                           40&lt;BR /&gt;
rtucw                                 43&lt;BR /&gt;
Poeyt                                 15  &lt;/P&gt;

&lt;P&gt;means i-p of CD have total 5 sessiosons in that 3 sessions not used securitycheck and 2 used security check&lt;/P&gt;

&lt;P&gt;I tired the below query but its not showing the output how i am expected&lt;/P&gt;

&lt;P&gt;index=A host=B cs_method="GET" cst="&lt;EM&gt;XXX&lt;/EM&gt;" [search index=A host=B cs_method="GET" cst="&lt;EM&gt;XXX&lt;/EM&gt;" | where isnull(ksid) and isnotnull(i_p) | stats c(_raw) by i_p|table i_p] | eval Usingsecu=if(match(csq, "ksid"), "Yes", "No") | stats count(i_p) as PCount by i_p id  Usingsecu |table i_p PCount s Usingsecu&lt;/P&gt;

&lt;P&gt;I got output like&lt;/P&gt;

&lt;P&gt;CD                                       2                     123fgs               No                  2&lt;BR /&gt;
CD                                            1                     1456mk             No                  1&lt;BR /&gt;
CD                                           1                      674hjn              Yes                  1&lt;BR /&gt;
CD                                            1                    453bcd              Yes                  1&lt;/P&gt;

&lt;P&gt;CW2                                  1&lt;BR /&gt;
DYLA                                     3&lt;BR /&gt;
ABC12                                    7&lt;BR /&gt;
XYZ31                                  34&lt;BR /&gt;
jjjwwgga                           39&lt;BR /&gt;
ngrisoew                           40&lt;BR /&gt;
rtucw                                 43&lt;BR /&gt;
Poeyt                                 15 &lt;/P&gt;

&lt;P&gt;Pl can anyone help me in this&lt;/P&gt;

&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:58:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145872#M40698</guid>
      <dc:creator>Laya123</dc:creator>
      <dc:date>2020-09-28T18:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145873#M40699</link>
      <description>&lt;P&gt;Can you write a simpler example? With less "sdfsdfas4235q235" and more "a1,a2,b1,b2,etc".&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 17:51:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145873#M40699</guid>
      <dc:creator>cchitten</dc:creator>
      <dc:date>2015-02-17T17:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to use subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145874#M40700</link>
      <description>&lt;P&gt;I'm also interested in the answer to this&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 14:38:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145874#M40700</guid>
      <dc:creator>markthompson</dc:creator>
      <dc:date>2015-02-18T14:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to use subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145875#M40701</link>
      <description>&lt;P&gt;markthompson, can you give me an example of the data you have and what you want to get out and I can try to answer your question?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 15:16:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145875#M40701</guid>
      <dc:creator>cchitten</dc:creator>
      <dc:date>2015-02-18T15:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to use subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145876#M40702</link>
      <description>&lt;P&gt;Hi cchitten,&lt;BR /&gt;
We have 2 different events, listed below;&lt;BR /&gt;
name=com.**************** value=5&lt;BR /&gt;
name=threshold.max.com*********** value=200&lt;/P&gt;

&lt;P&gt;which are transactioned together, but using that we want to use a subsearch in order to get the threshold max out of that transactioned event and set into a field called Max.&lt;/P&gt;

&lt;P&gt;Also, Its something completely new to me so would be useful if you know how for v6.0.5&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 15:25:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145876#M40702</guid>
      <dc:creator>markthompson</dc:creator>
      <dc:date>2015-02-18T15:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145877#M40703</link>
      <description>&lt;P&gt;So  you want:&lt;/P&gt;

&lt;P&gt;Threshold             Value&lt;BR /&gt;
          -                            5&lt;BR /&gt;
       Max                      200&lt;/P&gt;

&lt;P&gt;In that case I dont think you want to use subsearch. I think you want rex such as:&lt;/P&gt;

&lt;P&gt;| rex field=_raw "threshold.(?.*)."&lt;/P&gt;

&lt;P&gt;This should extract the field you want.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2015 08:16:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145877#M40703</guid>
      <dc:creator>cchitten</dc:creator>
      <dc:date>2015-02-19T08:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to use subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145878#M40704</link>
      <description>&lt;P&gt;Yeh we have found this solution now, thanks Cchitten, but I was also wondering how you use subsearches in 6.0.5 &lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2015 08:44:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145878#M40704</guid>
      <dc:creator>markthompson</dc:creator>
      <dc:date>2015-02-19T08:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to use subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145879#M40705</link>
      <description>&lt;P&gt;sorry for delay response, I have done this query which I asked using splunk documentation. Now i am getting results what I expected&lt;/P&gt;

&lt;P&gt;Thank  you&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2015 08:33:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145879#M40705</guid>
      <dc:creator>Laya123</dc:creator>
      <dc:date>2015-02-26T08:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to use subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145880#M40706</link>
      <description>&lt;P&gt;Hi @Laya123&lt;/P&gt;

&lt;P&gt;Can you please post your final search that actually solved your issue? Otherwise, this post is just going to float on Answers forever without a real solution. Thanks!&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2015 01:49:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145880#M40706</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-03-04T01:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to use subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145881#M40707</link>
      <description>&lt;P&gt;Hi Patrick,&lt;/P&gt;

&lt;P&gt;here is the query which I used&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=iis sourcetype=iis host=ABC cs_method="GET" cs_uri_stem="*mriweb.dll*" i_project!="sample" 
| where isnull(ksid) and isnotnull(i_p)  
| eval UsingSecu=if(match(csq, "ksid"), "Yes", "No")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2015 08:50:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-subsearch/m-p/145881#M40707</guid>
      <dc:creator>Laya123</dc:creator>
      <dc:date>2015-03-04T08:50:36Z</dc:date>
    </item>
  </channel>
</rss>

