<?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: show result of if a field not contains another field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-result-of-if-a-field-not-contains-another-field/m-p/639351#M221524</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254266"&gt;@hoseineagle&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;could you share some sample of your logs?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 10 Apr 2023 10:15:22 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-04-10T10:15:22Z</dc:date>
    <item>
      <title>How to show result of if a field not contains another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-result-of-if-a-field-not-contains-another-field/m-p/639350#M221523</link>
      <description>&lt;DIV class=""&gt;
&lt;DIV class=""&gt;Hi all,&lt;/DIV&gt;
&lt;DIV class=""&gt;I have two fields. I want a splunk query that not a field contains another field.&lt;/DIV&gt;
&lt;DIV class=""&gt;For example field1 is ::ffff:127.0.0.1 and the field2 is 127.0.0.1 , so I dont want to see the queries that field1 contains field2.&lt;/DIV&gt;
&lt;DIV class=""&gt;Thank you&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 10 Apr 2023 16:56:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-result-of-if-a-field-not-contains-another-field/m-p/639350#M221523</guid>
      <dc:creator>hoseineagle</dc:creator>
      <dc:date>2023-04-10T16:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: show result of if a field not contains another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-result-of-if-a-field-not-contains-another-field/m-p/639351#M221524</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254266"&gt;@hoseineagle&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;could you share some sample of your logs?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 10:15:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-result-of-if-a-field-not-contains-another-field/m-p/639351#M221524</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-04-10T10:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to show result of if a field not contains another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-result-of-if-a-field-not-contains-another-field/m-p/639388#M221536</link>
      <description>&lt;P&gt;If you want a simple comparison between two fields in the same event you just need to do a where command. Like&lt;/P&gt;&lt;PRE&gt;&amp;lt;your_base_search&amp;gt; &lt;BR /&gt;| where fielda!=fieldb&lt;/PRE&gt;&lt;P&gt;Be warned however that it works much slower than if you were looking for some specific field values since Splunk has to retrieve all results from your base search and then - event by event - parse out your fields and verify whether they fit your criteria or not. So you should be as specific as you can in your base search anyway to limit data Splunk needs to fetch from indexes.&lt;/P&gt;&lt;P&gt;EDIT: I see you don't want a simple equality comparison but a more complicated one. That's ok, you can use the "where" command with any expression that yields boolean results so you can use - for example - like() function.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 17:06:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-result-of-if-a-field-not-contains-another-field/m-p/639388#M221536</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-04-10T17:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to show result of if a field not contains another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-result-of-if-a-field-not-contains-another-field/m-p/639414#M221546</link>
      <description>&lt;P&gt;Try something like this (replace line one with your search)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval field1="::ffff:127.0.0.1", field2="127.0.0.1" 
| where like(field1,"%".field2)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 10 Apr 2023 19:23:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-result-of-if-a-field-not-contains-another-field/m-p/639414#M221546</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2023-04-10T19:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to show result of if a field not contains another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-result-of-if-a-field-not-contains-another-field/m-p/639459#M221561</link>
      <description>&lt;P&gt;It looks like the OP wants the opposite. &amp;nbsp;So&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where NOT like(field1,"%".field2)&lt;/LI-CODE&gt;&lt;P&gt;Anyway, what you are asking seems quite domain-specific. &amp;nbsp;So, this may not be the generalization your application calls for.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 07:28:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-result-of-if-a-field-not-contains-another-field/m-p/639459#M221561</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-04-11T07:28:59Z</dc:date>
    </item>
  </channel>
</rss>

