<?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: Assign keys to tokenised string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411036#M167822</link>
    <description>&lt;P&gt;sorry for the format of the text it appears. I could not preview it or see the option to edit my post.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Aug 2018 05:10:58 GMT</pubDate>
    <dc:creator>afulamba</dc:creator>
    <dc:date>2018-08-17T05:10:58Z</dc:date>
    <item>
      <title>Assign keys to tokenised string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411035#M167821</link>
      <description>&lt;P&gt;Hi there,&lt;BR /&gt;
Can someone help me with reading the tokenized string and assign the keys to each index retrieved. It is difficult for me as it is not key/value format to read.&lt;/P&gt;

&lt;P&gt;Log sample:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
CustomerService&lt;CODE&gt;getPointDetails&lt;/CODE&gt;6686&lt;CODE&gt;&lt;/CODE&gt;0x00000000&lt;CODE&gt;Successful Response&lt;/CODE&gt;2&lt;CODE&gt;3&lt;/CODE&gt;0&lt;CODE&gt;Louis/ST=Missouri/C=US&lt;/CODE&gt; &lt;CODE&gt;&lt;/CODE&gt;PRODESB6_STL|18234799|180817043259896&lt;CODE&gt;SAML&lt;/CODE&gt;0&lt;CODE&gt;0&lt;/CODE&gt;&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;
I know which values is for what field in the sequence they appear in the logs. It does has space as a value too. I did tried below but since there are more than 20 fields I have to extracts, the query becomes very long and ugly and can cause performance too.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
index=app sourcetype = audit&lt;BR /&gt;&lt;BR /&gt;
| eval tokenString=mvindex(split(mvindex(split(_raw,"gtid("),1),"): &lt;CODE&gt;"),1) &lt;BR /&gt;
| eval temp=split(tokenString,"&lt;/CODE&gt;") &lt;BR /&gt;
| eval field0=mvindex(temp,0) &lt;BR /&gt;
| eval field1=mvindex(temp,1)&lt;BR /&gt;&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;
I did check few regex option on web,  that was also long query too.&lt;/P&gt;

&lt;P&gt;Please advise.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 05:06:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411035#M167821</guid>
      <dc:creator>afulamba</dc:creator>
      <dc:date>2018-08-17T05:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Assign keys to tokenised string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411036#M167822</link>
      <description>&lt;P&gt;sorry for the format of the text it appears. I could not preview it or see the option to edit my post.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 05:10:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411036#M167822</guid>
      <dc:creator>afulamba</dc:creator>
      <dc:date>2018-08-17T05:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Assign keys to tokenised string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411037#M167823</link>
      <description>&lt;P&gt;@afulamba use the &lt;CODE&gt;&amp;lt;code&amp;gt;&lt;/CODE&gt; button on Splunk Answers i.e. &lt;CODE&gt;101010&lt;/CODE&gt; to post your code so that special characters do not escape. You can also select code to highlight and use shortcut &lt;CODE&gt;Ctrl+G&lt;/CODE&gt; to convert to code (which adds four spaces prior to every line of code)&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 06:34:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411037#M167823</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-08-17T06:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Assign keys to tokenised string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411038#M167824</link>
      <description>&lt;P&gt;@niketnilay: Thank you! I will take a not of it for my next posts.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 07:12:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411038#M167824</guid>
      <dc:creator>afulamba</dc:creator>
      <dc:date>2018-08-17T07:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Assign keys to tokenised string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411039#M167825</link>
      <description>&lt;P&gt;Reposting sample log and my code&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
CustomerService&lt;CODE&gt;getPointDetails&lt;/CODE&gt;6686&lt;CODE&gt;435&lt;/CODE&gt;52&lt;CODE&gt;8&lt;/CODE&gt;52&lt;CODE&gt;0x00000000&lt;/CODE&gt;Successful Response&lt;CODE&gt;2&lt;/CODE&gt;3&lt;CODE&gt;0&lt;/CODE&gt;Louis/ST=Missouri/C=US&lt;CODE&gt;PRODESB6_STL|18234799|180817043259896SAML&lt;/CODE&gt;0&lt;CODE&gt;0&lt;/CODE&gt;&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;My code:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;
index=app sourcetype = audit | eval tokenString=mvindex(split(mvindex(split(_raw,"gtid("),1),"): "),1) &lt;BR /&gt;
| eval temp=split(tokenString,"`") &lt;BR /&gt;
| eval field0=mvindex(temp,0) &lt;BR /&gt;
| eval field1=mvindex(temp,1)&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 07:15:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411039#M167825</guid>
      <dc:creator>afulamba</dc:creator>
      <dc:date>2018-08-17T07:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Assign keys to tokenised string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411040#M167826</link>
      <description>&lt;P&gt;Can someone help me here, please?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Amit&lt;/P&gt;</description>
      <pubDate>Sat, 18 Aug 2018 02:55:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Assign-keys-to-tokenised-string/m-p/411040#M167826</guid>
      <dc:creator>afulamba</dc:creator>
      <dc:date>2018-08-18T02:55:41Z</dc:date>
    </item>
  </channel>
</rss>

