<?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: How to pick overall message in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175080#M50249</link>
    <description>&lt;P&gt;yup it works , the only problem is it is picking everything after msg field . Can we do something like it picks line between "msg" and "categorySignificance" fields . I observed that message ends just before "categorySignificance" field.&lt;BR /&gt;
Here is the overall log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2014-12-26 16:22:42    Local7.Debug    172.28.70.132    CEF:0|Microsoft|Microsoft Windows||Microsoft-Windows-Security-Auditing:4634|An account was logged off.|Low| eventId=1 externalId=4634 msg=Network: A user or computer logged on to this computer from the network. categorySignificance=/Informational categoryBehavior=/Access/Stop categoryDeviceGroup=/Operating System catdt=Operating System categoryOutcome=/Success categoryObject=/Host/Operating System art=1419639752421 cat=Security deviceSeverity=Audit_success rt=1419639736000 dhost=WIN-789Z3VMFC02 dst=172.28.70.132 destinationZoneURI=/All Zones/ArcSight System/Private Address Space Zones/RFC1918: 172.16.0.0-172.31.255.255 dntdom=WIN-789Z3VMFC02 duser=Administrator duid=0x1d11f9 cs2=Logon/Logoff:Logoff cn1=3 c6a4=fe80:0:0:0:8045:2eed:5e73:a468 cs1Label=Accesses cs2Label=EventlogCategory cs4Label=Reason or Error Code cs5Label=Authentication Package Name cn1Label=LogonType cn2Label=CrashOnAuditFail cn3Label=Count c6a4Label=Agent IPv6 Address ahost=WIN-789Z3VMFC02 agt=1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 07 Jan 2015 14:13:23 GMT</pubDate>
    <dc:creator>vikas_gopal</dc:creator>
    <dc:date>2015-01-07T14:13:23Z</dc:date>
    <item>
      <title>How to pick overall message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175069#M50238</link>
      <description>&lt;P&gt;Hi Experts,&lt;BR /&gt;
I have syslog file and I want to generate a table from this log file .This file contains log like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2014-12-26 16:22:42 Local7.Debug    172.28.70.132   CEF:0|Microsoft|Microsoft Windows||Microsoft-Windows-Security-
Auditing:4634|An account was logged off.|Low| eventId=1 externalId=4634 msg=Network: A user or computer logged on to this computer from the network.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to pick complete "msg" from this log but in the table when I pick msg it shows only one word "Network". I want to show complete msg field like "Network: A user or computer logged on to this computer from the network."&lt;BR /&gt;
Please help on this .&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 13:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175069#M50238</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2015-01-07T13:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick overall message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175070#M50239</link>
      <description>&lt;P&gt;Splunk auto extracts fields when fields=value criteria is met. Since the event has  "msg=Network: " it auto extracts the msg field as Network&lt;/P&gt;

&lt;P&gt;To overcome this I would use a regular expression with named capturing groups to extract specific fields as per the requirement&lt;/P&gt;

&lt;P&gt;For e.g: to Capture the message using a named capturing group i would use this. Having said that using .* is not always the best method as it captures everything else after the msg actually ends. The field named as Message will capture the messages. LMK if this works&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?i)msg=(?P&amp;lt;Message&amp;gt;.*)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jan 2015 13:28:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175070#M50239</guid>
      <dc:creator>gabetheISguy</dc:creator>
      <dc:date>2015-01-07T13:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick overall message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175071#M50240</link>
      <description>&lt;P&gt;Hi vikas_gopal,&lt;/P&gt;

&lt;P&gt;how about this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search here | rex "\smsg\=(?&amp;lt;myMsg&amp;gt;.+?)\." | table myMsg
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;assumption there is no new line, line break after &lt;CODE&gt;msg=&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 13:28:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175071#M50240</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-01-07T13:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick overall message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175072#M50241</link>
      <description>&lt;P&gt;this is my first time that I am using REX . This is what I have done , but with this message is blank.&lt;BR /&gt;
    sourcetype="CEF" | table cat,msg | rex field=msg (?i)msg=(?P&lt;MESSAGE&gt;.*)&lt;/MESSAGE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 13:40:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175072#M50241</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2015-01-07T13:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick overall message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175073#M50242</link>
      <description>&lt;P&gt;This is what I have done , but with this message is blank.&lt;BR /&gt;
    sourcetype="CEF" | table cat,msg | rex field=msg (?i)msg=(?P&lt;MESSAGE&gt;.*)&lt;BR /&gt;
even I tried &lt;BR /&gt;
    sourcetype="CEF" | table cat,msg | rex field=msg "\smsg=(?&lt;MYMSG&gt;.+?)."&lt;/MYMSG&gt;&lt;/MESSAGE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 13:41:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175073#M50242</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2015-01-07T13:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick overall message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175074#M50243</link>
      <description>&lt;P&gt;this is because your field &lt;CODE&gt;msg&lt;/CODE&gt; only contains &lt;CODE&gt;Network&lt;/CODE&gt; use the rex like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="CEF" | rex  "(?i)msg=(?P&amp;lt;msg&amp;gt;.*)" | table cat,msg
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jan 2015 13:43:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175074#M50243</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-01-07T13:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick overall message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175075#M50244</link>
      <description>&lt;P&gt;try this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="CEF" | rex "\smsg\=(?&amp;lt;msg&amp;gt;.+?)\." | table cat, msg
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jan 2015 13:45:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175075#M50244</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-01-07T13:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick overall message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175076#M50245</link>
      <description>&lt;P&gt;yup it works , the only problem is it is picking everything after msg field . Can we do something like it picks line between "msg" and "categorySignificance" fields . I observed that message ends just before "categorySignificance" field.&lt;BR /&gt;
Here is the overall log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2014-12-26 16:22:42    Local7.Debug    172.28.70.132    CEF:0|Microsoft|Microsoft Windows||Microsoft-Windows-Security-Auditing:4634|An account was logged off.|Low| eventId=1 externalId=4634 msg=Network: A user or computer logged on to this computer from the network. categorySignificance=/Informational categoryBehavior=/Access/Stop categoryDeviceGroup=/Operating System catdt=Operating System categoryOutcome=/Success categoryObject=/Host/Operating System art=1419639752421 cat=Security deviceSeverity=Audit_success rt=1419639736000 dhost=WIN-789Z3VMFC02 dst=172.28.70.132 destinationZoneURI=/All Zones/ArcSight System/Private Address Space Zones/RFC1918: 172.16.0.0-172.31.255.255 dntdom=WIN-789Z3VMFC02 duser=Administrator duid=0x1d11f9 cs2=Logon/Logoff:Logoff cn1=3 c6a4=fe80:0:0:0:8045:2eed:5e73:a468 cs1Label=Accesses cs2Label=EventlogCategory cs4Label=Reason or Error Code cs5Label=Authentication Package Name cn1Label=LogonType cn2Label=CrashOnAuditFail cn3Label=Count c6a4Label=Agent IPv6 Address ahost=WIN-789Z3VMFC02 agt=1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jan 2015 13:59:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175076#M50245</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2015-01-07T13:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick overall message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175077#M50246</link>
      <description>&lt;P&gt;try my below provided regex, this will stop at the &lt;CODE&gt;.&lt;/CODE&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 14:03:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175077#M50246</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-01-07T14:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick overall message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175078#M50247</link>
      <description>&lt;P&gt;I tried above command only it is still picking everything after "msg" ,like till the last word of the overall log&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 14:07:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175078#M50247</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2015-01-07T14:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick overall message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175079#M50248</link>
      <description>&lt;P&gt;Try this regex here, see above ↑&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 14:11:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175079#M50248</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-01-07T14:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick overall message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175080#M50249</link>
      <description>&lt;P&gt;yup it works , the only problem is it is picking everything after msg field . Can we do something like it picks line between "msg" and "categorySignificance" fields . I observed that message ends just before "categorySignificance" field.&lt;BR /&gt;
Here is the overall log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2014-12-26 16:22:42    Local7.Debug    172.28.70.132    CEF:0|Microsoft|Microsoft Windows||Microsoft-Windows-Security-Auditing:4634|An account was logged off.|Low| eventId=1 externalId=4634 msg=Network: A user or computer logged on to this computer from the network. categorySignificance=/Informational categoryBehavior=/Access/Stop categoryDeviceGroup=/Operating System catdt=Operating System categoryOutcome=/Success categoryObject=/Host/Operating System art=1419639752421 cat=Security deviceSeverity=Audit_success rt=1419639736000 dhost=WIN-789Z3VMFC02 dst=172.28.70.132 destinationZoneURI=/All Zones/ArcSight System/Private Address Space Zones/RFC1918: 172.16.0.0-172.31.255.255 dntdom=WIN-789Z3VMFC02 duser=Administrator duid=0x1d11f9 cs2=Logon/Logoff:Logoff cn1=3 c6a4=fe80:0:0:0:8045:2eed:5e73:a468 cs1Label=Accesses cs2Label=EventlogCategory cs4Label=Reason or Error Code cs5Label=Authentication Package Name cn1Label=LogonType cn2Label=CrashOnAuditFail cn3Label=Count c6a4Label=Agent IPv6 Address ahost=WIN-789Z3VMFC02 agt=1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jan 2015 14:13:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pick-overall-message/m-p/175080#M50249</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2015-01-07T14:13:23Z</dc:date>
    </item>
  </channel>
</rss>

