<?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: How to evaluate the following string as a fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-the-following-string-as-a-fields/m-p/654203#M226053</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;&amp;lt;your current search&amp;gt;&amp;gt;
``` Extract installed packages ```
| rex max_match=0 field=Plugins "package installed\s*:\s*(?&amp;lt;installed&amp;gt;\S+)"
``` Extract "should be" names ```
| rex max_match=0 field=Plugins "Should be\s*:\s*(?&amp;lt;shouldBe&amp;gt;\S+)"
``` Pair installed with shouldBe ```
| eval packages=mvzip(installed, shouldBe, "#")
``` Give each pair its own event ```
| mvexpand packages
``` Break pairs apart ```
| eval packages=split(packages, "#")
| eval installed=mvindex(packages, 0), shouldBe=mvindex(packages, 1)
| table hostname installed shouldBe&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 13 Aug 2023 19:40:37 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-08-13T19:40:37Z</dc:date>
    <item>
      <title>How to evaluate the following string as a fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-the-following-string-as-a-fields/m-p/654202#M226052</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;BR /&gt;I have two servers with plugin details . I want to evaluate a column as Package_installed and Package_shouldbe based on the hostname in separate column .&lt;/P&gt;&lt;P&gt;server2 has multiple packages I want separate row and column for each package_shouldbe and package_installed and hostname field should be same .&lt;/P&gt;&lt;TABLE width="1572"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="642"&gt;hostname&lt;/TD&gt;&lt;TD width="930"&gt;Plugins&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;server1&lt;/TD&gt;&lt;TD width="930"&gt;Plugin Output:&lt;BR /&gt;Remote package installed : gnutls-3.6.16-5.el8_6&lt;BR /&gt;Should be&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : gnutls-3.6.16-6.el8_7&lt;BR /&gt;&lt;BR /&gt;NOTE: The vulnerability information above was derived by checking the&lt;BR /&gt;package versions of the affected packages from this advisory. This&lt;BR /&gt;scan is unable to rely on Red Hat's own security checks, which&lt;BR /&gt;consider channels and products in their vulnerability determinations.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;server2&lt;/TD&gt;&lt;TD width="930"&gt;Plugin Output:&lt;BR /&gt;Remote package installed : httpd-2.4.6-98.el7_9.6&lt;BR /&gt;Should be&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : httpd-2.4.6-98.el7_9.7&lt;BR /&gt;&lt;BR /&gt;Remote package installed : httpd-tools-2.4.6-98.el7_9.6&lt;BR /&gt;Should be&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : httpd-tools-2.4.6-98.el7_9.7&lt;BR /&gt;&lt;BR /&gt;Remote package installed : mod_session-2.4.6-98.el7_9.6&lt;BR /&gt;Should be&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : mod_session-2.4.6-98.el7_9.7&lt;BR /&gt;&lt;BR /&gt;NOTE: The vulnerability information above was derived by checking the&lt;BR /&gt;package versions of the affected packages from this advisory. This&lt;BR /&gt;scan is unable to rely on Red Hat's own security checks, which&lt;BR /&gt;consider channels and products in their vulnerability determinations.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sun, 13 Aug 2023 18:59:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-the-following-string-as-a-fields/m-p/654202#M226052</guid>
      <dc:creator>Hema_Nithya</dc:creator>
      <dc:date>2023-08-13T18:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to evaluate the following string as a fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-the-following-string-as-a-fields/m-p/654203#M226053</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;&amp;lt;your current search&amp;gt;&amp;gt;
``` Extract installed packages ```
| rex max_match=0 field=Plugins "package installed\s*:\s*(?&amp;lt;installed&amp;gt;\S+)"
``` Extract "should be" names ```
| rex max_match=0 field=Plugins "Should be\s*:\s*(?&amp;lt;shouldBe&amp;gt;\S+)"
``` Pair installed with shouldBe ```
| eval packages=mvzip(installed, shouldBe, "#")
``` Give each pair its own event ```
| mvexpand packages
``` Break pairs apart ```
| eval packages=split(packages, "#")
| eval installed=mvindex(packages, 0), shouldBe=mvindex(packages, 1)
| table hostname installed shouldBe&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 13 Aug 2023 19:40:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-the-following-string-as-a-fields/m-p/654203#M226053</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-08-13T19:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to evaluate the following string as a fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-the-following-string-as-a-fields/m-p/654217#M226063</link>
      <description>&lt;P&gt;It worked , thanks a lot&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 03:51:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-the-following-string-as-a-fields/m-p/654217#M226063</guid>
      <dc:creator>Hema_Nithya</dc:creator>
      <dc:date>2023-08-14T03:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to evaluate the following string as a fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-the-following-string-as-a-fields/m-p/656145#M226627</link>
      <description>&lt;P&gt;I have another issue in comparing and want to compare should_be with server_installed_package . Sometime package installed is higher after patching . Example given below for git , if the number 2 &amp;lt; 3 , it should mark as completed , else it should check for the next digit if it is 2. and it should check for another number .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE width="867"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64"&gt;CI&lt;/TD&gt;&lt;TD width="223"&gt;Installed&amp;nbsp;&lt;/TD&gt;&lt;TD width="302"&gt;shouldbe&lt;/TD&gt;&lt;TD width="214"&gt;server_installed_package&lt;/TD&gt;&lt;TD width="64"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;server1&lt;/TD&gt;&lt;TD&gt;git-2.31.1-3.el8_7&lt;/TD&gt;&lt;TD&gt;git-2.39.3-1.el8_8&lt;/TD&gt;&lt;TD&gt;git-3.40.3-1.el8_8&lt;/TD&gt;&lt;TD&gt;Not complete&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 30 Aug 2023 18:33:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-the-following-string-as-a-fields/m-p/656145#M226627</guid>
      <dc:creator>Hema_Nithya</dc:creator>
      <dc:date>2023-08-30T18:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to evaluate the following string as a fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-the-following-string-as-a-fields/m-p/656158#M226629</link>
      <description>&lt;P&gt;A new issue should be in a new question.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 20:36:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-evaluate-the-following-string-as-a-fields/m-p/656158#M226629</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-08-30T20:36:22Z</dc:date>
    </item>
  </channel>
</rss>

