<?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 for Log File Entries with Pipe delimiters in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472740#M133047</link>
    <description>&lt;P&gt;I think this will work for you...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your_search | rex  "[|:](?P&amp;lt;Status&amp;gt;\D\w{6,8})[| ]" | stats count by Status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The caveat is the 'failure' messages would need to be non-digit and between 6&amp;amp;8 characters in length (otherwise adjust the regex). Careful modifying the length too much or it may introduce false positives.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Feb 2020 20:47:10 GMT</pubDate>
    <dc:creator>mydog8it</dc:creator>
    <dc:date>2020-02-14T20:47:10Z</dc:date>
    <item>
      <title>Field extraction for Log File Entries with Pipe delimiters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472737#M133044</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a log file I am monitoring. Log file entries have pipe delimited field entries as below:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;LE Variation 1:&lt;/STRONG&gt;&lt;BR /&gt;
[default task-2] 2020-01-24 13:10:54,598 INFO  sample.sample.sample.sample.sample.sample.StatLogger  - ABCStat|XYZ|11111111111111111111|&lt;A href="http://www.abc.com/XYZ/123/ABCD/submission%7C2020-01-24T13:10:52.414Z%7C2020-01-24T13:10:54.595Z%7C2181%7C0%7C3909%7CREQSTI003000004:Invalid"&gt;http://www.abc.com/XYZ/123/ABCD/submission|2020-01-24T13:10:52.414Z|2020-01-24T13:10:54.595Z|2181|0|3909|REQSTI003000004:Invalid&lt;/A&gt; SOAP message format,Invalid SOAP message format: abc-def.5.2.2.2.2: The value '10.1' of element 'ns1:WSDLVersionNum' does not match the {value constraint} value '10.3'.|&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;LE Variation 2:&lt;/STRONG&gt;&lt;BR /&gt;
[default task-11] 2020-01-23 12:45:01,851 INFO  sample.sample.sample.sample.sample.sample.StatLogger  - ABCStat|XYZ|11111111111111111111|&lt;A href="http://www.abc.com/XYZ/123/ABCD/submission%7C2020-01-24T13:10:52.414Z%7C2020-01-24T13:10:54.595Z%7C2181%7C0%7C3909%7Csuccess%7C"&gt;http://www.abc.com/XYZ/123/ABCD/submission|2020-01-24T13:10:52.414Z|2020-01-24T13:10:54.595Z|2181|0|3909|success|&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Both variations exist in the log and I need both. The only differences among the two for distinction is that |success| defines successful transaction and anything other than |success| is a failure.&lt;/P&gt;

&lt;P&gt;I need fields to be extracted using regex or eval in Splunk search please. You can rename them as samples and I will update at my end as needed.&lt;/P&gt;

&lt;P&gt;Thanks in-advance.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 19:16:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472737#M133044</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-02-14T19:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction for Log File Entries with Pipe delimiters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472738#M133045</link>
      <description>&lt;P&gt;What have you tried so far?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 19:38:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472738#M133045</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-02-14T19:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction for Log File Entries with Pipe delimiters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472739#M133046</link>
      <description>&lt;P&gt;I tried using field extractor but that will not do it because it should be done at the main config level. While that piece is being discussed, I need to go ahead and do search time extraction so I can create reports as needed.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 19:49:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472739#M133046</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-02-14T19:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction for Log File Entries with Pipe delimiters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472740#M133047</link>
      <description>&lt;P&gt;I think this will work for you...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your_search | rex  "[|:](?P&amp;lt;Status&amp;gt;\D\w{6,8})[| ]" | stats count by Status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The caveat is the 'failure' messages would need to be non-digit and between 6&amp;amp;8 characters in length (otherwise adjust the regex). Careful modifying the length too much or it may introduce false positives.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 20:47:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472740#M133047</guid>
      <dc:creator>mydog8it</dc:creator>
      <dc:date>2020-02-14T20:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction for Log File Entries with Pipe delimiters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472741#M133048</link>
      <description>&lt;P&gt;Hi mydog8it,&lt;/P&gt;

&lt;P&gt;First, I need to have the pipe delimited fields extracted in SPL search. For example:&lt;/P&gt;

&lt;P&gt;task: [default task-11]&lt;BR /&gt;
timestamp: 2020-01-23 12:45:01,851 &lt;BR /&gt;
loglevel: INFO&lt;BR /&gt;
URL: sample.sample.sample.sample.sample.sample.StatLogger - &lt;BR /&gt;
type: ABCStat&lt;BR /&gt;
app: XYZ&lt;BR /&gt;
id: 11111111111111111111&lt;BR /&gt;
surl: &lt;A href="http://www.abc.com/XYZ/123/ABCD/submission"&gt;http://www.abc.com/XYZ/123/ABCD/submission&lt;/A&gt;&lt;BR /&gt;
timestamp2: 2020-01-24T13:10:52.414Z&lt;BR /&gt;
timestamp3: 2020-01-24T13:10:54.595Z&lt;BR /&gt;
transactionid: 2181&lt;BR /&gt;
code: 0&lt;BR /&gt;
submission: 3909&lt;BR /&gt;
status: success&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 21:25:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472741#M133048</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-02-14T21:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction for Log File Entries with Pipe delimiters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472742#M133049</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="
[default task-2] 2020-01-24 13:10:54,598 INFO sample.sample.sample.sample.sample.sample.StatLogger - ABCStat|XYZ|11111111111111111111|http://www.abc.com/XYZ/123/ABCD/submission|2020-01-24T13:10:52.414Z|2020-01-24T13:10:54.595Z|2181|0|3909|REQSTI003000004:Invalid SOAP message format,Invalid SOAP message format: abc-def.5.2.2.2.2: The value '10.1' of element 'ns1:WSDLVersionNum' does not match the {value constraint} value '10.3'.|
[default task-11] 2020-01-23 12:45:01,851 INFO sample.sample.sample.sample.sample.sample.StatLogger - ABCStat|XYZ|11111111111111111111|http://www.abc.com/XYZ/123/ABCD/submission|2020-01-24T13:10:52.414Z|2020-01-24T13:10:54.595Z|2181|0|3909|success|"
| makemv delim="
" _raw 
| stats count by _raw
| table _raw
`comment("this is your sample")`
| eval tmp=mvzip(split(_raw,"|"),mvrange(0,mvcount(split(_raw,"|"))))
| eval success=mvindex(split(_raw,"|"),9)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, @mbasharat &lt;BR /&gt;
Fields are left for clarity.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2020 01:56:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472742#M133049</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-15T01:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction for Log File Entries with Pipe delimiters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472743#M133050</link>
      <description>&lt;P&gt;Slight adjustment based on my use case and worked great. Thanks!!!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 17:00:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-for-Log-File-Entries-with-Pipe-delimiters/m-p/472743#M133050</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-02-25T17:00:55Z</dc:date>
    </item>
  </channel>
</rss>

