<?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 How to find a log entry that doesn't have a match with another one? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-a-log-entry-that-doesn-t-have-a-match-with-another/m-p/437255#M124515</link>
    <description>&lt;P&gt;So, I get a bunch of log entries that look something like this (grossly simplified) example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host1 tag - foo
host1 tag + foo
host1 tag - bar
host1 tag - something
host1 tag + something
host1 tag - evil
host1 tag + blarg
host2 tag - zoinks
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to find the log entries that have a "- $thing" without a corresponding "+ $thing" in a 24-hour period.  So for the above, I want to see "bar evil zoinks".&lt;/P&gt;

&lt;P&gt;I can easily write a search to find the "-" entries.  But when I try to exclude the ones with a corresponding "+" entry, it gets hairy.  The original query already takes a while to run, and I can have thousands of matches.  The obvious approach would seem to be a subsearch.  But a subsearch seems like it's asking for an N-squared performance.  Is there some better way to do this?  I would intuitively expect that maybe a join or a selfjoin would help, but I can't figure it out.  I'll keep working on this in the meantime.  &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2019 23:21:10 GMT</pubDate>
    <dc:creator>mortya</dc:creator>
    <dc:date>2019-03-11T23:21:10Z</dc:date>
    <item>
      <title>How to find a log entry that doesn't have a match with another one?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-a-log-entry-that-doesn-t-have-a-match-with-another/m-p/437255#M124515</link>
      <description>&lt;P&gt;So, I get a bunch of log entries that look something like this (grossly simplified) example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host1 tag - foo
host1 tag + foo
host1 tag - bar
host1 tag - something
host1 tag + something
host1 tag - evil
host1 tag + blarg
host2 tag - zoinks
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to find the log entries that have a "- $thing" without a corresponding "+ $thing" in a 24-hour period.  So for the above, I want to see "bar evil zoinks".&lt;/P&gt;

&lt;P&gt;I can easily write a search to find the "-" entries.  But when I try to exclude the ones with a corresponding "+" entry, it gets hairy.  The original query already takes a while to run, and I can have thousands of matches.  The obvious approach would seem to be a subsearch.  But a subsearch seems like it's asking for an N-squared performance.  Is there some better way to do this?  I would intuitively expect that maybe a join or a selfjoin would help, but I can't figure it out.  I'll keep working on this in the meantime.  &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 23:21:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-a-log-entry-that-doesn-t-have-a-match-with-another/m-p/437255#M124515</guid>
      <dc:creator>mortya</dc:creator>
      <dc:date>2019-03-11T23:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a log entry that doesn't have a match with another one?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-a-log-entry-that-doesn-t-have-a-match-with-another/m-p/437256#M124516</link>
      <description>&lt;P&gt;I don't know if this will work or not but you can give it a try.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;fields with dash and name seperated&amp;gt;| table dash name 
| streamstats values(dash) as d by name |stats values(d) as d by name | where NOT d="+"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also try this : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;field with dash and name seperated&amp;gt; | table dash name |  transaction name startswith=dash="+" endswith=dash="-" maxevents=2 keepevicted=t | where linecount=1 AND dash="-" AND field_match_sum=1 | table name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Mar 2019 00:05:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-a-log-entry-that-doesn-t-have-a-match-with-another/m-p/437256#M124516</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-03-12T00:05:07Z</dc:date>
    </item>
  </channel>
</rss>

