<?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: Compare same field with values for equality in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-same-field-with-values-for-equality/m-p/626395#M217722</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233419"&gt;@PaulPanther&lt;/a&gt;&amp;nbsp; Could you advise if there is any way to validate the VLAN ID's&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For the below one the mismatch value is due to missing VLAN 285 and 2010.. Is there any way to do the comparison in that way.&lt;/P&gt;&lt;DIV&gt;hyp_vm5 YG92412K 5_767_285_2010 &amp;nbsp;MISMATCH&lt;/DIV&gt;&lt;DIV&gt;hyp_vm6 YG92412K 5_767 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MISMATCH&lt;/DIV&gt;</description>
    <pubDate>Mon, 09 Jan 2023 11:42:44 GMT</pubDate>
    <dc:creator>satish</dc:creator>
    <dc:date>2023-01-09T11:42:44Z</dc:date>
    <item>
      <title>How to compare same field with values for equality?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-same-field-with-values-for-equality/m-p/626380#M217712</link>
      <description>&lt;DIV&gt;Hi Experts,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I would like to compare values in same field (vlan_ids) for equality based on a machine serial (hyp_serial).&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Would like validate whether the VLAN ID's are configured on both VM's under same hyp_serial are same or not equal.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;There will be 2 VM's under the same serial.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Could you please help me with my requirement.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;index=lab source=unix_hyp&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;| spath path=hyp_info{}{} output=LIST&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;| mvexpand LIST&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;| spath input=LIST&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;| where category == "hyp_vlan"&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;| table hyp_name hyp_serial vlan_ids&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Table Output:&lt;/DIV&gt;
&lt;DIV&gt;------------------&lt;/DIV&gt;
&lt;DIV&gt;hyp_name &amp;nbsp; &amp;nbsp; hyp_serial &amp;nbsp; vlan_ids&lt;/DIV&gt;
&lt;DIV&gt;hyp_vm1 AE12893X &amp;nbsp; &amp;nbsp;5_767_285_2010&lt;/DIV&gt;
&lt;DIV&gt;hyp_vm2 &amp;nbsp; &amp;nbsp; AE12893X5_356_375_2010&lt;/DIV&gt;
&lt;DIV&gt;hyp_vm3 &amp;nbsp; &amp;nbsp;ZX87627J9_49_43_44_3120&lt;/DIV&gt;
&lt;DIV&gt;hyp_vm4 &amp;nbsp; &amp;nbsp; ZX87627J9_49_43_44_3120&lt;/DIV&gt;
&lt;DIV&gt;hyp_vm5 YG92412K5_767_285_2010&lt;/DIV&gt;
&lt;DIV&gt;hyp_vm6 YG92412K 5_767&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Expected Output:&lt;/DIV&gt;
&lt;DIV&gt;-----------------&lt;/DIV&gt;
&lt;DIV&gt;hyp_name &amp;nbsp; &amp;nbsp; hyp_serial &amp;nbsp; vlan_ids &amp;nbsp; &amp;nbsp; &amp;nbsp;VLAN CHECK&lt;/DIV&gt;
&lt;DIV&gt;hyp_vm1 AE12893X &amp;nbsp; &amp;nbsp;5_767_285_2010 &amp;nbsp; &amp;nbsp;OK&lt;/DIV&gt;
&lt;DIV&gt;hyp_vm2 &amp;nbsp; &amp;nbsp; AE12893X 5_356_375_2010 &amp;nbsp;OK&lt;/DIV&gt;
&lt;DIV&gt;hyp_vm3 &amp;nbsp; &amp;nbsp;ZX87627J 9_49_43_44_3120 &amp;nbsp;OK&lt;/DIV&gt;
&lt;DIV&gt;hyp_vm4 &amp;nbsp; &amp;nbsp; ZX87627J 9_49_43_44_3120 &amp;nbsp;OK&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;hyp_vm5 YG92412K 5_767_285_2010 &amp;nbsp;MISMATCH&lt;/DIV&gt;
&lt;DIV&gt;hyp_vm6 YG92412K 5_767 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MISMATCH&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Jan 2023 16:30:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-same-field-with-values-for-equality/m-p/626380#M217712</guid>
      <dc:creator>satish</dc:creator>
      <dc:date>2023-01-09T16:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Compare same field with values for equality</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-same-field-with-values-for-equality/m-p/626391#M217719</link>
      <description>&lt;P&gt;Following search should do the trick&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=lab source=unix_hyp 
| spath path=hyp_info{}{} output=LIST 
| mvexpand LIST 
| spath input=LIST 
| where category == "hyp_vlan" 
| stats dc(hyp_name) as result by hyp_serial, vlan_ids
| eval status=case(result=2, "OK", result&amp;lt;2, "MISMATCH")
| fields - result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 10:57:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-same-field-with-values-for-equality/m-p/626391#M217719</guid>
      <dc:creator>PaulPanther</dc:creator>
      <dc:date>2023-01-09T10:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Compare same field with values for equality</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-same-field-with-values-for-equality/m-p/626395#M217722</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233419"&gt;@PaulPanther&lt;/a&gt;&amp;nbsp; Could you advise if there is any way to validate the VLAN ID's&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For the below one the mismatch value is due to missing VLAN 285 and 2010.. Is there any way to do the comparison in that way.&lt;/P&gt;&lt;DIV&gt;hyp_vm5 YG92412K 5_767_285_2010 &amp;nbsp;MISMATCH&lt;/DIV&gt;&lt;DIV&gt;hyp_vm6 YG92412K 5_767 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MISMATCH&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Jan 2023 11:42:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-same-field-with-values-for-equality/m-p/626395#M217722</guid>
      <dc:creator>satish</dc:creator>
      <dc:date>2023-01-09T11:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Compare same field with values for equality</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-same-field-with-values-for-equality/m-p/626396#M217723</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/252335"&gt;@satish&lt;/a&gt;&amp;nbsp;If the VLAN_IDs are more or less static values you could work with lookups (&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.3/Knowledge/Aboutlookupsandfieldactions" target="_blank"&gt;About lookups - Splunk Documentation&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Execute following steps for it:&lt;/P&gt;&lt;P&gt;1. Create new empty lookup&lt;/P&gt;&lt;P&gt;2. Create a scheduled report to fill the lookup with valid VLAN_IDs based on your ingested data OR fill the lookup manually with values&lt;/P&gt;&lt;P&gt;3. Use the lookup within your search to get an overview about all VMs whose associated VLAN IDs are not valid&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 11:57:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-same-field-with-values-for-equality/m-p/626396#M217723</guid>
      <dc:creator>PaulPanther</dc:creator>
      <dc:date>2023-01-09T11:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Compare same field with values for equality</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-same-field-with-values-for-equality/m-p/626397#M217724</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233419"&gt;@PaulPanther&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Let me try using Lookup.. Thanks Paul.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 11:59:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-same-field-with-values-for-equality/m-p/626397#M217724</guid>
      <dc:creator>satish</dc:creator>
      <dc:date>2023-01-09T11:59:51Z</dc:date>
    </item>
  </channel>
</rss>

