<?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: Filter search string to field with only 1 specific value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406452#M171907</link>
    <description>&lt;P&gt;I've tried to test this using the following query. Maybe you can check and tell me if I'm understanding it wrong somewhere:&lt;BR /&gt;
    | makeresults count=10 &lt;BR /&gt;
    | eval application="app".random()%10 &lt;BR /&gt;
    | eval computer="computer".random()%6 &lt;BR /&gt;
    | stats values(application) as apps by computer &lt;BR /&gt;
    | where mvcount(apps)=1&lt;/P&gt;</description>
    <pubDate>Mon, 15 Apr 2019 07:11:07 GMT</pubDate>
    <dc:creator>harshpatel</dc:creator>
    <dc:date>2019-04-15T07:11:07Z</dc:date>
    <item>
      <title>Filter search string to field with only 1 specific value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406445#M171900</link>
      <description>&lt;P&gt;I want to output computers who only has started 1 specific application&lt;BR /&gt;
Field values: Application + Computers&lt;/P&gt;

&lt;P&gt;There is multiple computers and multiple applications in the datafile.&lt;BR /&gt;
So i want to list all computers who only have 1 specific value in the Application field.&lt;/P&gt;

&lt;P&gt;Example&lt;BR /&gt;
If Computer1 has ApplicationA, ApplicationB and ApplicationC in the Application field list, I do not want Computer1 in the output&lt;BR /&gt;
If Computer2 ONLY have ApplicationA in the  Application field list. Then I want Computer2 in the Output&lt;/P&gt;

&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 09:03:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406445#M171900</guid>
      <dc:creator>lbkAconectodk</dc:creator>
      <dc:date>2019-04-12T09:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Filter search string to field with only 1 specific value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406446#M171901</link>
      <description>&lt;P&gt;Hope this helps:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | stats count as app_count, values(APPLICATION_FIELDNAME) by COMPUTER_FIELDNAME | where app_count=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;for reference:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.5/SearchReference/Stats"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.5/SearchReference/Stats&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 09:27:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406446#M171901</guid>
      <dc:creator>harshpatel</dc:creator>
      <dc:date>2019-04-12T09:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Filter search string to field with only 1 specific value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406447#M171902</link>
      <description>&lt;P&gt;Unfortunately this still gives me computers which have multiple entries in the application field.&lt;/P&gt;

&lt;P&gt;But will try look into the stats function&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 12:37:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406447#M171902</guid>
      <dc:creator>lbkAconectodk</dc:creator>
      <dc:date>2019-04-12T12:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filter search string to field with only 1 specific value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406448#M171903</link>
      <description>&lt;P&gt;If you have duplicate events you should perform dedup first:&lt;BR /&gt;
    | dedup computer, application &lt;BR /&gt;
    | stats count as app_count, values(application) by computer &lt;BR /&gt;
    | where app_count=1&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:05:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406448#M171903</guid>
      <dc:creator>harshpatel</dc:creator>
      <dc:date>2020-09-30T00:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Filter search string to field with only 1 specific value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406449#M171904</link>
      <description>&lt;P&gt;To add some more information to my Question. The data is regarding which applications that was started from specific computers. So i want to filter out computers that have started more than 1 application, or even a specific application if that helps.&lt;/P&gt;

&lt;P&gt;I tried dedup, but it still shows computer if they have more applications.&lt;BR /&gt;
This is example of the output.. I only want PC005291 to be showed if 1 unique entry with application&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;       Field                              Field                                    Field            Field
    _time                           Application                        Activity        extracted_Host
05/09/201811:48:27.000  Autostart SP IE11             Proxy           PC005291

05/09/2018 11:45:54.000 VA - login til StoreFront   Proxy           PC005291
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 12:57:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406449#M171904</guid>
      <dc:creator>lbkAconectodk</dc:creator>
      <dc:date>2019-04-12T12:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Filter search string to field with only 1 specific value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406450#M171905</link>
      <description>&lt;P&gt;Hey, can you please try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; your search | stats count(computer) as count by application | where count=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;hope this will help!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 13:11:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406450#M171905</guid>
      <dc:creator>riddhichandaran</dc:creator>
      <dc:date>2019-04-12T13:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Filter search string to field with only 1 specific value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406451#M171906</link>
      <description>&lt;P&gt;Hi @lbkAconectodk, Does the application field have a comma-separated list of applications?&lt;/P&gt;

&lt;P&gt;And I realized query should return the same with or without dedup because of our stats command.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 07:05:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406451#M171906</guid>
      <dc:creator>harshpatel</dc:creator>
      <dc:date>2019-04-15T07:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Filter search string to field with only 1 specific value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406452#M171907</link>
      <description>&lt;P&gt;I've tried to test this using the following query. Maybe you can check and tell me if I'm understanding it wrong somewhere:&lt;BR /&gt;
    | makeresults count=10 &lt;BR /&gt;
    | eval application="app".random()%10 &lt;BR /&gt;
    | eval computer="computer".random()%6 &lt;BR /&gt;
    | stats values(application) as apps by computer &lt;BR /&gt;
    | where mvcount(apps)=1&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 07:11:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-search-string-to-field-with-only-1-specific-value/m-p/406452#M171907</guid>
      <dc:creator>harshpatel</dc:creator>
      <dc:date>2019-04-15T07:11:07Z</dc:date>
    </item>
  </channel>
</rss>

