<?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 Table view in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Table-view/m-p/394245#M190822</link>
    <description>&lt;P&gt;Hi Guys in splunk i need to create a report . i am trying to create a table with two columns please find the search key below &lt;/P&gt;

&lt;P&gt;messageTypeKey=CM0001 ,disQualificationMessage=Cancelled by validation rules. SafeTimeNoPhoneHasNoEmail &lt;BR /&gt;
Table messageTypeKey,disQualificationMessage &lt;/P&gt;

&lt;P&gt;i need the message key and disqualification message &lt;BR /&gt;
but the table looks like &lt;BR /&gt;
 CM0001   Cancelled &lt;/P&gt;

&lt;P&gt;the message after the Cancelled is not appending &lt;BR /&gt;
i need some suggestions on this &lt;BR /&gt;
thanks in advance&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jul 2019 14:17:38 GMT</pubDate>
    <dc:creator>venkat0896</dc:creator>
    <dc:date>2019-07-22T14:17:38Z</dc:date>
    <item>
      <title>Table view</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-view/m-p/394245#M190822</link>
      <description>&lt;P&gt;Hi Guys in splunk i need to create a report . i am trying to create a table with two columns please find the search key below &lt;/P&gt;

&lt;P&gt;messageTypeKey=CM0001 ,disQualificationMessage=Cancelled by validation rules. SafeTimeNoPhoneHasNoEmail &lt;BR /&gt;
Table messageTypeKey,disQualificationMessage &lt;/P&gt;

&lt;P&gt;i need the message key and disqualification message &lt;BR /&gt;
but the table looks like &lt;BR /&gt;
 CM0001   Cancelled &lt;/P&gt;

&lt;P&gt;the message after the Cancelled is not appending &lt;BR /&gt;
i need some suggestions on this &lt;BR /&gt;
thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 14:17:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-view/m-p/394245#M190822</guid>
      <dc:creator>venkat0896</dc:creator>
      <dc:date>2019-07-22T14:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Table view</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-view/m-p/394246#M190823</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Can you provide your query with sample events?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 14:57:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-view/m-p/394246#M190823</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-07-22T14:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Table view</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-view/m-p/394247#M190824</link>
      <description>&lt;P&gt;source=" " status="Cancelled" | table messageTypeKey,disQualificationMessage&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 15:25:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-view/m-p/394247#M190824</guid>
      <dc:creator>venkat0896</dc:creator>
      <dc:date>2019-07-22T15:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Table view</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-view/m-p/394248#M190825</link>
      <description>&lt;P&gt;Hi @venkat0896,&lt;/P&gt;

&lt;P&gt;This makes total sense because you are allowing splunk to auto-extract the field. &lt;/P&gt;

&lt;P&gt;By default the extraction that happens is KV which means key-value and in the case of &lt;CODE&gt;disQualificationMessage=Cancelled by validation rules&lt;/CODE&gt;the value is only &lt;CODE&gt;Cancelled&lt;/CODE&gt; and not the entire message.&lt;/P&gt;

&lt;P&gt;What you will need to do is extract a new field matching exactly what you want to have in the disqualification message. If in your case you need "Cancelled by validation rules. " then you can use the following regex for the extraction :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;disQualificationMessage\=(?&amp;lt;disQualificationMessage&amp;gt;[^\.]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can use this run anywhere search to test it out:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval A="messageTypeKey=CM0001 ,disQualificationMessage=Cancelled by validation rules. SafeTimeNoPhoneHasNoEmail" 
| rex field=A "disQualificationMessage\=(?&amp;lt;disQualificationMessage&amp;gt;[^\.]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try this for the search in your comment:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=" " status="Cancelled" | rex field=_raw "disQualificationMessage\=(?&amp;lt;disQualificationMessage&amp;gt;[^\.]+)"| table messageTypeKey,disQualificationMessage
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 15:28:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-view/m-p/394248#M190825</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-07-22T15:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Table view</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-view/m-p/394249#M190826</link>
      <description>&lt;P&gt;@venkat0896 you can use regular expression to perform field extraction as per your needs. Try the following rex command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  rex "disQualificationMessage=(?&amp;lt;disQualificationMessage&amp;gt;[^\.]+)\.\sSafeTimeNoPhoneHasNoEmail"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is a run anywhere example based on your sample data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  makeresults
|  eval _raw="messageTypeKey=CM0001 ,disQualificationMessage=Cancelled by validation rules. SafeTimeNoPhoneHasNoEmail" 
|  rex "disQualificationMessage=(?&amp;lt;disQualificationMessage&amp;gt;[^\.]+)\.\sSafeTimeNoPhoneHasNoEmail"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jul 2019 15:28:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-view/m-p/394249#M190826</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-07-22T15:28:57Z</dc:date>
    </item>
  </channel>
</rss>

