<?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: Field extraction needed in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-needed/m-p/524686#M147992</link>
    <description>&lt;P&gt;Perfect. Thank you!!!!&lt;/P&gt;</description>
    <pubDate>Wed, 14 Oct 2020 16:53:55 GMT</pubDate>
    <dc:creator>mbasharat</dc:creator>
    <dc:date>2020-10-14T16:53:55Z</dc:date>
    <item>
      <title>Field extraction needed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-needed/m-p/524652#M147978</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have data in XML format. Out of many fields that I have extracted, there is another field name &lt;STRONG&gt;pluginText&lt;/STRONG&gt; which is in below format.&amp;nbsp;I need to have some fields extracted from below.&lt;/P&gt;&lt;P&gt;I need below two fields. Also, if there is a rex I can use to extract all fields in below tags using a universal logic, that will be great. Thanks in-advance!!!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Nessus version&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Plugin feed version&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;See sample below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;pluginText: &amp;lt;plugin_output&amp;gt;Information about this scan :

Nessus version : 7.6.3
Plugin feed version : 202010122335
Scanner edition used : Sample
Scan type : Windows Agent
Scan policy used : Windows_Server_2019
Scanner IP : 0.0.0.0
Thorough tests : no
Experimental tests : no
Paranoia level : 1
Report verbosity : 1
Safe checks : yes
Optimize the test : yes
Credentialed checks : yes
Patch management checks : None
Display superseded patches : yes (supersedence plugin did not launch)
CGI scanning : disabled
Web application tests : disabled
Max hosts :
Max checks : 5
Recv timeout : 5
Backports : None
Allow post-scan editing: Yes
Scan duration : unknown
&amp;lt;/plugin_output&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 14:38:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-needed/m-p/524652#M147978</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-10-14T14:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction needed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-needed/m-p/524678#M147986</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex max_match=0 field=events "(\r|\n)*(?&amp;lt;tag&amp;gt;[^:]+):(?&amp;lt;value&amp;gt;[^\r\n]+)"
| eval tagvalue=mvzip(tag,value,":")
| mvexpand tagvalue
| fields tagvalue
| rex field=tagvalue "(?&amp;lt;tag&amp;gt;.+)\s:\s(?&amp;lt;value&amp;gt;.+)"
| fields - tagvalue&lt;/LI-CODE&gt;&lt;P&gt;First line will extract the fields, the remainder creates separate events for each if you need that. If not, you could "lookup" the tags and their values in the multi-value fields thus&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex max_match=0 field=events "(\r|\n)*(?&amp;lt;tag&amp;gt;[^:]+):(?&amp;lt;value&amp;gt;[^\r\n]+)"
| eval tag=mvmap(tag,trim(tag))
| eval value=mvmap(value,trim(value))
| eval nessus=mvfind(tag,"Nessus version")
| eval nessusvalue=mvindex(value,nessus)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 14 Oct 2020 16:05:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-needed/m-p/524678#M147986</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-14T16:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction needed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-needed/m-p/524681#M147988</link>
      <description>&lt;P&gt;Hi ITWhisperer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So first solution produces results and I am testing them. I tried using the second one as well to test as well and it is giving error that &lt;STRONG&gt;mvmap&lt;/STRONG&gt; is unsupported or undefined. I am&amp;nbsp;@ Splunk Enterprise 7.x. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 16:16:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-needed/m-p/524681#M147988</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-10-14T16:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction needed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-needed/m-p/524682#M147989</link>
      <description>&lt;P&gt;There are a few things you can if you don't have mvmap&lt;/P&gt;&lt;P&gt;Include the space in the mvfind and trim the value found&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex max_match=0 field=events "(\r|\n)*(?&amp;lt;tag&amp;gt;[^:]+):(?&amp;lt;value&amp;gt;[^\r\n]+)"
| eval nessus=mvfind(tag,"Nessus version ")
| eval nessusvalue=trim(mvindex(value,nessus))&lt;/LI-CODE&gt;&lt;P&gt;Compress " : " to ":" in the string before rex&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval events=replace(events," : ",":")
| rex max_match=0 field=events "(\r|\n)*(?&amp;lt;tag&amp;gt;[^:]+):(?&amp;lt;value&amp;gt;[^\r\n]+)"
| eval nessus=mvfind(tag,"Nessus version")
| eval nessusvalue=mvindex(value,nessus)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 16:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-needed/m-p/524682#M147989</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-14T16:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction needed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-needed/m-p/524686#M147992</link>
      <description>&lt;P&gt;Perfect. Thank you!!!!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 16:53:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-needed/m-p/524686#M147992</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-10-14T16:53:55Z</dc:date>
    </item>
  </channel>
</rss>

