<?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 exclude a certain field value from results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-exclude-a-certain-field-value-from-results/m-p/199705#M57845</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;.. | where userid != "system" | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or maybe tweak your regex &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?i)\suser\s(?!system)(?P&amp;lt;userid&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 17 Jun 2014 22:33:07 GMT</pubDate>
    <dc:creator>Damien_Dallimor</dc:creator>
    <dc:date>2014-06-17T22:33:07Z</dc:date>
    <item>
      <title>how to exclude a certain field value from results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-exclude-a-certain-field-value-from-results/m-p/199703#M57843</link>
      <description>&lt;P&gt;Search query: list the last known user (userid) on each host.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=syslog source=/var/log/secure "pam_unix(sshd:session)" | rex "(?i) user (?P&amp;lt;userid&amp;gt;[^ ]+)" | stats latest(userid) as userid by host, _time | dedup host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I then want to exclude a particular user "system" from the result list.&lt;/P&gt;

&lt;P&gt;I tried the NOT and "!=" in every part of the query but not working, can you help me with the search query&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2014 22:13:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-exclude-a-certain-field-value-from-results/m-p/199703#M57843</guid>
      <dc:creator>ayenumula</dc:creator>
      <dc:date>2014-06-17T22:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to exclude a certain field value from results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-exclude-a-certain-field-value-from-results/m-p/199704#M57844</link>
      <description>&lt;P&gt;Does the value "system" appear in the filed you create? If so then you should be able to pipe your original search to the search command and exclude the "system" value with "| search userid!=system".&lt;/P&gt;

&lt;P&gt;sourcetype=syslog source=/var/log/secure "pam_unix(sshd:session)" | rex "(?i) user (?P&lt;USERID&gt;[^ ]+)" | stats latest(userid) as userid by host, _time | dedup host | search userid!=system&lt;/USERID&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2014 22:29:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-exclude-a-certain-field-value-from-results/m-p/199704#M57844</guid>
      <dc:creator>alterdego</dc:creator>
      <dc:date>2014-06-17T22:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to exclude a certain field value from results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-exclude-a-certain-field-value-from-results/m-p/199705#M57845</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;.. | where userid != "system" | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or maybe tweak your regex &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?i)\suser\s(?!system)(?P&amp;lt;userid&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Jun 2014 22:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-exclude-a-certain-field-value-from-results/m-p/199705#M57845</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2014-06-17T22:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to exclude a certain field value from results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-exclude-a-certain-field-value-from-results/m-p/199706#M57846</link>
      <description>&lt;P&gt;Damien's answer: | where userid != "system". This worked as it included the host (row) which has "system" user but excluded "system" from the result set, it still displayed the host with other users.&lt;/P&gt;

&lt;P&gt;I tried Alterdego's answer: "| search userid!=system". This did not work for me because it completely excluded the host (row) which contains the word "system" even thou it contains other users.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2014 23:00:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-exclude-a-certain-field-value-from-results/m-p/199706#M57846</guid>
      <dc:creator>ayenumula</dc:creator>
      <dc:date>2014-06-18T23:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to exclude a certain field value from results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-exclude-a-certain-field-value-from-results/m-p/199707#M57847</link>
      <description>&lt;P&gt;Is there a certain way to exclude multiple users using | where userid != "system"&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2014 23:02:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-exclude-a-certain-field-value-from-results/m-p/199707#M57847</guid>
      <dc:creator>ayenumula</dc:creator>
      <dc:date>2014-06-18T23:02:26Z</dc:date>
    </item>
  </channel>
</rss>

