<?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 Split not working in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Split-not-working/m-p/436595#M76171</link>
    <description>&lt;P&gt;I have following data after this query:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=sdlocp_epo-solutiontest sourcetype="kube:container:customer-soap-app"&lt;BR /&gt;
| spath &lt;BR /&gt;
| search level="SERVICE_PERF" &lt;BR /&gt;
| table message&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;|2800|BackOffice|T999999||Servcie1|8b81dbd0-ba0f-11e9-8912-914decccd432|Success|67|NA|NA|NA&lt;BR /&gt;
|2800|BackOffice|T999999||Servcie1|8b81dbd0-ba0f-11e9-8912-914decccd432|Success|67|NA|NA|NA&lt;BR /&gt;
|2800|BackOffice|T999999||Servcie1|8b81dbd0-ba0f-11e9-8912-914decccd432|Success|67|NA|NA|NA&lt;BR /&gt;
|2800|BackOffice|T999999||Servcie2|8b81dbd0-ba0f-11e9-8912-914decccd432|Success|16|NA|NA|NA&lt;BR /&gt;
|2800|BackOffice|T999999||Servcie2|8b81dbd0-ba0f-11e9-8912-914decccd432|Success|16|NA|NA|NA&lt;BR /&gt;
|2800|BackOffice|T999999||Servcie2|8b81dbd0-ba0f-11e9-8912-914decccd432|Success|16|NA|NA|NA&lt;/P&gt;

&lt;P&gt;I  then run the following query:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=sdlocp_epo-solutiontest sourcetype="kube:container:customer-soap-app"&lt;BR /&gt;
| spath &lt;BR /&gt;
| search level="NG_SERVICE_PERFORMANCE" &lt;BR /&gt;
| table message &lt;BR /&gt;
| eval fields=split(message,"|") , etime=mvindex(fields,8) &lt;BR /&gt;
| table etime&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;It fails.&lt;/P&gt;

&lt;P&gt;When I run it with _raw instead of message in split, it works. Why is that so?&lt;/P&gt;

&lt;P&gt;I am using logs in JSON format.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Aug 2019 20:01:57 GMT</pubDate>
    <dc:creator>amitg_23</dc:creator>
    <dc:date>2019-08-08T20:01:57Z</dc:date>
    <item>
      <title>Split not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-not-working/m-p/436595#M76171</link>
      <description>&lt;P&gt;I have following data after this query:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=sdlocp_epo-solutiontest sourcetype="kube:container:customer-soap-app"&lt;BR /&gt;
| spath &lt;BR /&gt;
| search level="SERVICE_PERF" &lt;BR /&gt;
| table message&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;|2800|BackOffice|T999999||Servcie1|8b81dbd0-ba0f-11e9-8912-914decccd432|Success|67|NA|NA|NA&lt;BR /&gt;
|2800|BackOffice|T999999||Servcie1|8b81dbd0-ba0f-11e9-8912-914decccd432|Success|67|NA|NA|NA&lt;BR /&gt;
|2800|BackOffice|T999999||Servcie1|8b81dbd0-ba0f-11e9-8912-914decccd432|Success|67|NA|NA|NA&lt;BR /&gt;
|2800|BackOffice|T999999||Servcie2|8b81dbd0-ba0f-11e9-8912-914decccd432|Success|16|NA|NA|NA&lt;BR /&gt;
|2800|BackOffice|T999999||Servcie2|8b81dbd0-ba0f-11e9-8912-914decccd432|Success|16|NA|NA|NA&lt;BR /&gt;
|2800|BackOffice|T999999||Servcie2|8b81dbd0-ba0f-11e9-8912-914decccd432|Success|16|NA|NA|NA&lt;/P&gt;

&lt;P&gt;I  then run the following query:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=sdlocp_epo-solutiontest sourcetype="kube:container:customer-soap-app"&lt;BR /&gt;
| spath &lt;BR /&gt;
| search level="NG_SERVICE_PERFORMANCE" &lt;BR /&gt;
| table message &lt;BR /&gt;
| eval fields=split(message,"|") , etime=mvindex(fields,8) &lt;BR /&gt;
| table etime&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;It fails.&lt;/P&gt;

&lt;P&gt;When I run it with _raw instead of message in split, it works. Why is that so?&lt;/P&gt;

&lt;P&gt;I am using logs in JSON format.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 20:01:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-not-working/m-p/436595#M76171</guid>
      <dc:creator>amitg_23</dc:creator>
      <dc:date>2019-08-08T20:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Split not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-not-working/m-p/436596#M76172</link>
      <description>&lt;P&gt;Sorry, second query is:&lt;BR /&gt;
index=sdlocp_epo-solutiontest sourcetype="kube:container:customer-soap-app"&lt;BR /&gt;
| spath &lt;BR /&gt;
| search level="SERVICE_PERF" &lt;BR /&gt;
| table message &lt;BR /&gt;
| eval fields=split(message,"|") , etime=mvindex(fields,8) &lt;BR /&gt;
| table etime&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:40:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-not-working/m-p/436596#M76172</guid>
      <dc:creator>amitg_23</dc:creator>
      <dc:date>2020-09-30T01:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Split not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-not-working/m-p/436597#M76173</link>
      <description>&lt;P&gt;I am not sure why its not working because the syntax looks perfect. Do you get any error?&lt;BR /&gt;&lt;BR /&gt;
Well you could use &lt;CODE&gt;rex&lt;/CODE&gt; to get the desired result.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sdlocp_epo-solutiontest sourcetype="kube:container:customer-soap-app"
| spath 
| search level="SERVICE_PERF" 
| table message 
| rex field=message "\|\w+\|(?&amp;lt;etime&amp;gt;\d+)\|"
| table etime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 21:54:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-not-working/m-p/436597#M76173</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-08-08T21:54:16Z</dc:date>
    </item>
  </channel>
</rss>

