<?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: Extracting a composite variable and comparing it with the rows of an index. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extracting-a-composite-variable-and-comparing-it-with-the-rows/m-p/677993#M231859</link>
    <description>&lt;P&gt;It is not clear whether you are matching hostname and vulnerability or dev and vulnerability. In either case, your table doesn't appear to have any rows where patch should be NO (according to your logic). Please can you clarify your requirement.&lt;/P&gt;&lt;P&gt;If the table was supposed to be the result, rather than the events, please can you share some sample events.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Feb 2024 14:55:17 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-02-19T14:55:17Z</dc:date>
    <item>
      <title>Extracting a composite variable and comparing it with the rows of an index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-a-composite-variable-and-comparing-it-with-the-rows/m-p/677992#M231858</link>
      <description>&lt;P&gt;"I have an issue with creating a field named 'Path' which should be populated with 'YES' or 'NO' based on the following information:&lt;/P&gt;&lt;P&gt;I have fields like 'Hostname', 'dev', and 'vulnerability'. I need to take the values in 'dev' and 'vulnerability' and check if there are other rows with the same 'hostname' and 'vulnerability'. If there is a match, I write 'NO' in the 'Path' field; otherwise, I write 'YES'."&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="39px"&gt;&lt;P&gt;&lt;SPAN&gt;Hostname&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%" height="39px"&gt;dev&lt;/TD&gt;&lt;TD width="25%" height="39px"&gt;&lt;SPAN&gt;vulnerabilita &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="39px"&gt;&lt;SPAN&gt;patch &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;A&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;apache &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;SI &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;A&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;sql&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;NO&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;apache &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;NO&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;python&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;NO &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;C &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;A &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;apache&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;&lt;SPAN&gt;SI&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 19 Feb 2024 14:47:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-a-composite-variable-and-comparing-it-with-the-rows/m-p/677992#M231858</guid>
      <dc:creator>omcollia</dc:creator>
      <dc:date>2024-02-19T14:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting a composite variable and comparing it with the rows of an index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-a-composite-variable-and-comparing-it-with-the-rows/m-p/677993#M231859</link>
      <description>&lt;P&gt;It is not clear whether you are matching hostname and vulnerability or dev and vulnerability. In either case, your table doesn't appear to have any rows where patch should be NO (according to your logic). Please can you clarify your requirement.&lt;/P&gt;&lt;P&gt;If the table was supposed to be the result, rather than the events, please can you share some sample events.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 14:55:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-a-composite-variable-and-comparing-it-with-the-rows/m-p/677993#M231859</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-19T14:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting a composite variable and comparing it with the rows of an index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-a-composite-variable-and-comparing-it-with-the-rows/m-p/678047#M231882</link>
      <description>&lt;P&gt;&lt;SPAN&gt;"I will have a table composed of Hostname, Dev (hostname of the development machine associated with the machine in the Hostname field), vulnerability (vulnerability associated with the machine in Hostname). The Dev field is only used to see if the machine in Hostname has a machine in development associated with it. I should verify that in my table there is not that machine (in this case in the hostname field) associated with the same vulnerability."&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;HOSTNAME&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;DEV&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;VULNERABILITà&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;PAPERINO&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;pippo&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;APACHE&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;In this case, my machine "paperino" has a vulnerability "apache", and it also has a development machine associated with it. Therefore, I should verify that for the machine "Pippo" there isn't the same vulnerability&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;HOSTNAME&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;DEV&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;VULNERABILITà&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;PIPPO&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;-&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;APACHE&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;If this row were present in my search, then in the row of the table above, I should write "YES" in my new field that I will create. because pippo have same vulnerability (apache )&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 09:23:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-a-composite-variable-and-comparing-it-with-the-rows/m-p/678047#M231882</guid>
      <dc:creator>omcollia</dc:creator>
      <dc:date>2024-02-20T09:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting a composite variable and comparing it with the rows of an index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-a-composite-variable-and-comparing-it-with-the-rows/m-p/678054#M231885</link>
      <description>&lt;P&gt;Thanks for a clearer description of your usecase&lt;/P&gt;&lt;P&gt;Please try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eventstats values(Hostname) as hosts by vulnerability
| eval patch=if(isnotnull(mvfind(hosts,dev)), "Yes", "No")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 20 Feb 2024 10:46:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-a-composite-variable-and-comparing-it-with-the-rows/m-p/678054#M231885</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-20T10:46:43Z</dc:date>
    </item>
  </channel>
</rss>

