<?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: Search result not in second with rex fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-result-not-in-second-with-rex-fields/m-p/579512#M201936</link>
    <description>&lt;P&gt;Do the two searches work independently?&amp;nbsp; Do they produce id field values that match?&lt;/P&gt;&lt;P&gt;If the two searches produce the same set of IDs then they'll cancel each other out and you'll get no results.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Dec 2021 19:34:03 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-12-29T19:34:03Z</dc:date>
    <item>
      <title>Search result not in second with rex fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-result-not-in-second-with-rex-fields/m-p/579511#M201935</link>
      <description>&lt;P&gt;I want to look for requests in a service mesh ingest log which have no corresponding application log entries.&lt;BR /&gt;&lt;BR /&gt;My first search is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;index=kubernetes source=*envoy-proxy*  (api.foo.com OR info) AND downstream_remote_disconnect 
| rex field=_raw "\[[^\]]+\] \"(?&amp;lt;downstream&amp;gt;[^\"]+)\".*\"(POST|GET) \"(?&amp;lt;host&amp;gt;[^\"]+)\" \"(?&amp;lt;path&amp;gt;[^\"\?]+)[\?]?\" [^\"]+\" (?&amp;lt;status&amp;gt;\d+).*\"(?&amp;lt;id1&amp;gt;[0-9a-f]{8})-(?&amp;lt;id2&amp;gt;[0-9a-f]{4})-(?&amp;lt;id3&amp;gt;[0-9a-f]{4})"
| eval id=id1.id2.id3
| fields id&lt;/PRE&gt;&lt;P&gt;my second search is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;index=kubernetes source=*proxy* operation:
| rex field=_raw "span_id:(?&amp;lt;id&amp;gt;[0-9a-f]{16});"
| fields id&lt;/PRE&gt;&lt;P&gt;and the obvious way of combining them yields no results&lt;/P&gt;&lt;PRE&gt;index=kubernetes source=*envoy-proxy*  (api.foo.com OR info) AND downstream_remote_disconnect 
| rex field=_raw "\[[^\]]+\] \"(?&amp;lt;downstream&amp;gt;[^\"]+)\".*\"(POST|GET) \"(?&amp;lt;host&amp;gt;[^\"]+)\" \"(?&amp;lt;path&amp;gt;[^\"\?]+)[\?]?\" [^\"]+\" (?&amp;lt;status&amp;gt;\d+).*\"(?&amp;lt;id1&amp;gt;[0-9a-f]{8})-(?&amp;lt;id2&amp;gt;[0-9a-f]{4})-(?&amp;lt;id3&amp;gt;[0-9a-f]{4})"
| eval id=id1.id2.id3
| fields id
| search NOT [
search index=kubernetes source=*proxy* operation:
| rex field=_raw "span_id:(?&amp;lt;id&amp;gt;[0-9a-f]{16});"
| fields id
]&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Dec 2021 19:49:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-result-not-in-second-with-rex-fields/m-p/579511#M201935</guid>
      <dc:creator>drew_eckhardt</dc:creator>
      <dc:date>2021-12-29T19:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Search result not in second with rex fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-result-not-in-second-with-rex-fields/m-p/579512#M201936</link>
      <description>&lt;P&gt;Do the two searches work independently?&amp;nbsp; Do they produce id field values that match?&lt;/P&gt;&lt;P&gt;If the two searches produce the same set of IDs then they'll cancel each other out and you'll get no results.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 19:34:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-result-not-in-second-with-rex-fields/m-p/579512#M201936</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-12-29T19:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Search result not in second with rex fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-result-not-in-second-with-rex-fields/m-p/579514#M201938</link>
      <description>&lt;P&gt;The searches work independently.&lt;BR /&gt;&lt;BR /&gt;The first search has events with id fields that do not exist in the second search.&lt;BR /&gt;&lt;BR /&gt;I learned this when&amp;nbsp;I manually went through 50+ entries from the first search and looked for them with an AND clause in the second search producing no matches.&lt;BR /&gt;&lt;BR /&gt;I'd like to automate that process.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 19:46:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-result-not-in-second-with-rex-fields/m-p/579514#M201938</guid>
      <dc:creator>drew_eckhardt</dc:creator>
      <dc:date>2021-12-29T19:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Search result not in second with rex fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-result-not-in-second-with-rex-fields/m-p/579522#M201941</link>
      <description>&lt;P&gt;Have you tried formatting the results of the second search?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=kubernetes source=*envoy-proxy*  (api.foo.com OR info) AND downstream_remote_disconnect 
| rex field=_raw "\[[^\]]+\] \"(?&amp;lt;downstream&amp;gt;[^\"]+)\".*\"(POST|GET) \"(?&amp;lt;host&amp;gt;[^\"]+)\" \"(?&amp;lt;path&amp;gt;[^\"\?]+)[\?]?\" [^\"]+\" (?&amp;lt;status&amp;gt;\d+).*\"(?&amp;lt;id1&amp;gt;[0-9a-f]{8})-(?&amp;lt;id2&amp;gt;[0-9a-f]{4})-(?&amp;lt;id3&amp;gt;[0-9a-f]{4})"
| eval id=id1.id2.id3
| fields id
| search NOT [
  search index=kubernetes source=*proxy* operation:
  | rex field=_raw "span_id:(?&amp;lt;id&amp;gt;[0-9a-f]{16});"
  | fields id
  | format
  ]&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 29 Dec 2021 21:11:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-result-not-in-second-with-rex-fields/m-p/579522#M201941</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-12-29T21:11:02Z</dc:date>
    </item>
  </channel>
</rss>

