<?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: create a search query that finds a field value (eg A) that have mismatched field value(B) and field value (C) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/657989#M227276</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;What I am trying to do it create search query that finds src_ip when the field values of two fields, src and device matches with the below output.&lt;/P&gt;&lt;P&gt;src field values I am getting from --&lt;/P&gt;&lt;PRE&gt;index="idx-network-firewall" (sourcetype="fgt_traffic" OR sourcetype="fortigate_traffic")&lt;BR /&gt;| stats latest(_time) values(srcname) as src latest(app) as app by src_ip&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;and device field value I am getting from lookup -&lt;/P&gt;&lt;PRE&gt;| lookup Stores_Inventory src_ip OUTPUT Device&lt;BR /&gt;| table src_ip Device src app&lt;/PRE&gt;&lt;P&gt;hope this is clear!&lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2023 12:23:27 GMT</pubDate>
    <dc:creator>man03359</dc:creator>
    <dc:date>2023-09-19T12:23:27Z</dc:date>
    <item>
      <title>How to create a search query that finds a field value (eg A) that have mismatched field value(B) and field value (C)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/657866#M227233</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;Below is my search query -&lt;/P&gt;
&lt;PRE&gt;index="idx-network-firewall" (sourcetype="fgt_traffic" OR sourcetype="fortigate_traffic")&lt;BR /&gt;| stats latest(_time) values(srcname) as src latest(app) as app by src_ip&lt;BR /&gt;| lookup Stores_Inventory src_ip OUTPUT Device&lt;BR /&gt;| table src_ip Device src app&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I have 3 fields src_ip, src and device. I am getting the field values for src from the first 2 lines of the query -&lt;/P&gt;
&lt;PRE&gt;index="idx-network-firewall" (sourcetype="fgt_traffic" OR sourcetype="fortigate_traffic")&lt;BR /&gt;| stats latest(_time) values(srcname) as src latest(app) as app by src_ip&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I am trying to build a search query&amp;nbsp;&lt;SPAN&gt;&lt;SPAN class=""&gt;that finds src_ips that have mismatched src name and device name.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 22:19:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/657866#M227233</guid>
      <dc:creator>man03359</dc:creator>
      <dc:date>2023-09-18T22:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: create a search query that finds a field value (eg A) that have mismatched field value(B) and field value (C)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/657867#M227234</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/257114"&gt;@man03359&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;what do you mean with "&lt;SPAN&gt;src_ips that have mismatched src name and device name."?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe src_ips that have different src_name or different device_name?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if this is your requirement, please try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="idx-network-firewall" (sourcetype="fgt_traffic" OR sourcetype="fortigate_traffic")
| lookup Stores_Inventory src_ip OUTPUT Device
| stats 
   latest(_time) AS latest
   values(srcname) as srcname 
   latest(app) as app 
   dc(srcname) AS srcname_count
   dc(Device) AS Device_count
   BY src_ip
| where srcname_count&amp;gt;1 OR Device_count&amp;gt;1
| table src_ip Device src app&lt;/LI-CODE&gt;&lt;P&gt;In this way you'll list all the src_ips with more than one name or device.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 10:08:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/657867#M227234</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-18T10:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: create a search query that finds a field value (eg A) that have mismatched field value(B) and field value (C)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/657989#M227276</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;What I am trying to do it create search query that finds src_ip when the field values of two fields, src and device matches with the below output.&lt;/P&gt;&lt;P&gt;src field values I am getting from --&lt;/P&gt;&lt;PRE&gt;index="idx-network-firewall" (sourcetype="fgt_traffic" OR sourcetype="fortigate_traffic")&lt;BR /&gt;| stats latest(_time) values(srcname) as src latest(app) as app by src_ip&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;and device field value I am getting from lookup -&lt;/P&gt;&lt;PRE&gt;| lookup Stores_Inventory src_ip OUTPUT Device&lt;BR /&gt;| table src_ip Device src app&lt;/PRE&gt;&lt;P&gt;hope this is clear!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 12:23:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/657989#M227276</guid>
      <dc:creator>man03359</dc:creator>
      <dc:date>2023-09-19T12:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: create a search query that finds a field value (eg A) that have mismatched field value(B) and field value (C)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/657990#M227277</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/257114"&gt;@man03359&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;only for confirmation: you need to filter the main search using two fields from a lookup (src_ip and Device), is it correct?&lt;/P&gt;&lt;P&gt;if this is your requirement, you have to use a subsearch with inputlookup:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="idx-network-firewall" (sourcetype="fgt_traffic" OR sourcetype="fortigate_traffic") [ | inputlookup Stores_Inventory | fields src_ip Device ]
| stats latest(_time) values(srcname) as src latest(app) as app by src_ip 
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 12:27:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/657990#M227277</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-19T12:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: create a search query that finds a field value (eg A) that have mismatched field value(B) and field value (C)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/658576#M227473</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I was able to figure out the query which worked for me-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="idx-network-firewall" (sourcetype="fgt_traffic" OR sourcetype="fortigate_traffic") * [| inputlookup  Stores_Inventory
| search Device="stp*"
| return 1601 src_ip]
| stats latest(_time) values(srcname) as src latest(app) as app by src_ip
| lookup Stores_Inventory src_ip OUTPUT Device
| eval Device = lower(Device)  
| eval src=lower(src)
| where isnotnull(Device) AND isnotnull(src)
| rex field=src "(?i)^(?&amp;lt;src&amp;gt;.*?)(?:\..*)?$"
| where src!=Device 
| table src_ip Device src app &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the Help, really appreciate it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 11:59:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/658576#M227473</guid>
      <dc:creator>man03359</dc:creator>
      <dc:date>2023-09-25T11:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: create a search query that finds a field value (eg A) that have mismatched field value(B) and field value (C)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/658578#M227474</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/257114"&gt;@man03359&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 12:27:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-query-that-finds-a-field-value-eg-A-that/m-p/658578#M227474</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-25T12:27:02Z</dc:date>
    </item>
  </channel>
</rss>

