<?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 generate a search of unique URI and all the client IP's hitting in a commas field and total count of the IP's hitting the URI? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360174#M106492</link>
    <description>&lt;P&gt;Woodcock's should work.  This would also work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval ClientIP=mvjoin(ClientIP,",")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hmmm.  Regarding woodcock's code, rex is acting like some other kind of whitespace is in between the IP addresses after nomv, as opposed to a plain vanilla space. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval ClientIP="10.166.148.11 10.166.148.15 10.166.149.13"  | makemv ClientIP | eval ClientIP1=ClientIP, ClientIP2=ClientIP, ClientIP3=ClientIP
| nomv ClientIP1 | rex field=ClientIP1 mode=sed "s/ /,/g"
| eval ClientIP2=mvjoin(ClientIP2,",")
| nomv ClientIP3 | rex field=ClientIP3 mode=sed "s/\s/,/g"
| table ClientIP ClientIP1 ClientIP2 ClientIP3


ClientIP =
10.166.148.11 
10.166.148.15 
10.166.149.13 

ClientIP1 = 10.166.148.11 10.166.148.15 10.166.149.13
ClientIP2 = 10.166.148.11,10.166.148.15,10.166.149.13  
ClientIP3 = 10.166.148.11,10.166.148.15,10.166.149.13 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 17 Mar 2017 21:06:46 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-03-17T21:06:46Z</dc:date>
    <item>
      <title>How to generate a search of unique URI and all the client IP's hitting in a commas field and total count of the IP's hitting the URI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360172#M106490</link>
      <description>&lt;P&gt;Am in a process of creating a report, in which i have URI's  from many different hosts  hitting from multiple IP's . &lt;/P&gt;

&lt;P&gt;Requirement : I would like to have report like this where IP's have a comma separation .&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;URI                                  Client IP                                              Total count 
-------------                        ----------------                                       --------------
URI/XYZ/service/ENDPOINT      10.256.85.164,10.528.65.313,10.58,65.198                      2500
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But my search results this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=xyz index=urx host=jjk*  | extract endpoint-extractions | stats count values(clientip) as ClientIP by uri | sort  by uri

uri                              count                ClientIP
//Services/Service?MMJD          53                  10.166.148.11
                                                           10.166.148.15
                                                           10.166.149.13
/Services/Orders                    22                   10.178.5.152
                                                           10.178.5.153
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to get 30 days report for 2000 plus services from different domains. Can use tstats to have the results quickly.&lt;/P&gt;

&lt;P&gt;Please help me with search to get the result for 30 days. Highly appreciate your help. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 17:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360172#M106490</guid>
      <dc:creator>krish899</dc:creator>
      <dc:date>2017-03-17T17:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search of unique URI and all the client IP's hitting in a commas field and total count of the IP's hitting the URI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360173#M106491</link>
      <description>&lt;P&gt;Just add this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| nomv ClientIP | rex field=ClientIP mode=sed "s/s\+/,/g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Mar 2017 18:08:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360173#M106491</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-17T18:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search of unique URI and all the client IP's hitting in a commas field and total count of the IP's hitting the URI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360174#M106492</link>
      <description>&lt;P&gt;Woodcock's should work.  This would also work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval ClientIP=mvjoin(ClientIP,",")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hmmm.  Regarding woodcock's code, rex is acting like some other kind of whitespace is in between the IP addresses after nomv, as opposed to a plain vanilla space. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval ClientIP="10.166.148.11 10.166.148.15 10.166.149.13"  | makemv ClientIP | eval ClientIP1=ClientIP, ClientIP2=ClientIP, ClientIP3=ClientIP
| nomv ClientIP1 | rex field=ClientIP1 mode=sed "s/ /,/g"
| eval ClientIP2=mvjoin(ClientIP2,",")
| nomv ClientIP3 | rex field=ClientIP3 mode=sed "s/\s/,/g"
| table ClientIP ClientIP1 ClientIP2 ClientIP3


ClientIP =
10.166.148.11 
10.166.148.15 
10.166.149.13 

ClientIP1 = 10.166.148.11 10.166.148.15 10.166.149.13
ClientIP2 = 10.166.148.11,10.166.148.15,10.166.149.13  
ClientIP3 = 10.166.148.11,10.166.148.15,10.166.149.13 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Mar 2017 21:06:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360174#M106492</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-17T21:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search of unique URI and all the client IP's hitting in a commas field and total count of the IP's hitting the URI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360175#M106493</link>
      <description>&lt;P&gt;Thanks @woodcock .&lt;/P&gt;

&lt;P&gt;Appreciate your help.&lt;/P&gt;

&lt;P&gt;I used this command for my report : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;basesearch | extract endpoints-extractions | stats count values(clientip) as All_ClientIP by uri | eval clientip=mvjoin(All_ClientIP,",") | fields - All_ClientIP
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I'll prefer using  &lt;CODE&gt;| eval ClientIP=mvjoin(ClientIP,",")&lt;/CODE&gt; in my next reports .&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2017 00:25:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360175#M106493</guid>
      <dc:creator>krish899</dc:creator>
      <dc:date>2017-03-18T00:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search of unique URI and all the client IP's hitting in a commas field and total count of the IP's hitting the URI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360176#M106494</link>
      <description>&lt;P&gt;You accepted the wrong answer then!  Mine does work (maybe worth upvoting it) but you should &lt;CODE&gt;UnAccept&lt;/CODE&gt; mine and &lt;CODE&gt;Accept&lt;/CODE&gt; the answer by @DalJeanis because his is better.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2017 02:12:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360176#M106494</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-18T02:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search of unique URI and all the client IP's hitting in a commas field and total count of the IP's hitting the URI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360177#M106495</link>
      <description>&lt;P&gt;Yes, I updated my answer to account for more general variety.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2017 21:33:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-of-unique-URI-and-all-the-client-IP-s/m-p/360177#M106495</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-18T21:33:22Z</dc:date>
    </item>
  </channel>
</rss>

