<?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 logs with different and same fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635460#M220774</link>
    <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;I tried that already, but it still shows the results in the stats.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Mar 2023 07:17:23 GMT</pubDate>
    <dc:creator>nmayafit</dc:creator>
    <dc:date>2023-03-22T07:17:23Z</dc:date>
    <item>
      <title>How to filter logs with different and same fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635402#M220753</link>
      <description>&lt;P&gt;Hi. Subject is confusing so here goes. I have 3 log lines:&lt;/P&gt;
&lt;P&gt;org=A Status=Success&lt;/P&gt;
&lt;P&gt;org=A Status=Fail&lt;/P&gt;
&lt;P&gt;org=B Status=Success&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to get stats for orgs that have Status=Success, but not if those orgs have even one log where Status=Fail.&lt;/P&gt;
&lt;P&gt;I tried to filter in the search query (but then, I get the line where org=A Status=Success) and in a WHERE clause, with no luck. I'm trying to find the right method to do this kind of filtering.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 20:23:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635402#M220753</guid>
      <dc:creator>nmayafit</dc:creator>
      <dc:date>2023-03-22T20:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filter logs with different and same fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635405#M220754</link>
      <description>&lt;P&gt;I assume these are three separate events.&amp;nbsp; You can't filter one event based on value of another event. If you want just a summary of your orgs do something like that&lt;/P&gt;&lt;PRE&gt;&amp;lt;your base search&amp;gt;&lt;BR /&gt;| stats values(Status) by org&lt;BR /&gt;| where NOT Status="Fail"&lt;/PRE&gt;&lt;P&gt;If you want full events use eventstats instead of stats but be aware that eventstats is limited by resource constraints so may not work well on big datasets.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 22:10:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635405#M220754</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-03-21T22:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Filter logs with different and same fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635460#M220774</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;I tried that already, but it still shows the results in the stats.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 07:17:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635460#M220774</guid>
      <dc:creator>nmayafit</dc:creator>
      <dc:date>2023-03-22T07:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filter logs with different and same fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635462#M220775</link>
      <description>&lt;LI-CODE lang="markup"&gt;| stats values(Status) as Status by org
| where NOT Status="Fail"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 Mar 2023 08:01:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635462#M220775</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-22T08:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filter logs with different and same fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635464#M220776</link>
      <description>&lt;P&gt;That's why I said - if you're ok with just the aggregation, use simple stats command. If you want to retain the original events, use eventstats (with the same syntax). Just be warned about the possible performance issues.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 08:18:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635464#M220776</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-03-22T08:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Filter logs with different and same fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635467#M220777</link>
      <description>&lt;P&gt;I don't need the original events, so I use stats, but it still shows as a line with this values&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 08:33:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635467#M220777</guid>
      <dc:creator>nmayafit</dc:creator>
      <dc:date>2023-03-22T08:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filter logs with different and same fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635471#M220780</link>
      <description>&lt;P&gt;Right. Forgot to rename the resulting field with stats. See &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt; 's answer. It is conceptually the same as mine, it's just that he didn't forget to alias the field &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; His solution should work. Mine should also work if you replaced the where condition with:&lt;/P&gt;&lt;PRE&gt;| where NOT 'values(Status)'="Fail"&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Mar 2023 08:50:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635471#M220780</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-03-22T08:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Filter logs with different and same fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635472#M220781</link>
      <description>&lt;P&gt;I tried his and yours with no luck. Lines with the specific attributes still show.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 08:53:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635472#M220781</guid>
      <dc:creator>nmayafit</dc:creator>
      <dc:date>2023-03-22T08:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Filter logs with different and same fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635475#M220783</link>
      <description>&lt;P&gt;It seems like the information you have provided isn't sufficiently accurate for our suggested solutions to work. Please share more accurate representations of your raw events, preferably in a code block &amp;lt;/&amp;gt; to prevent information being lost due to formatting.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 09:02:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-logs-with-different-and-same-fields/m-p/635475#M220783</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-22T09:02:45Z</dc:date>
    </item>
  </channel>
</rss>

