<?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: Regex for filed extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-filed-extraction/m-p/150397#M42146</link>
    <description>&lt;P&gt;If your sourcetype is syslog, and you have &lt;A href="http://apps.splunk.com/app/833/"&gt;Splunk_TA_nix&lt;/A&gt; installed, you should get the user information that you want. If you really want it all in one field, you could try this in your props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mysourcetype]
REPORT-myfield = myfield
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then in your transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[myfield]
REGEX = (\w{3}\s+\d+\s+\d{2}:\d{2}:\d{2}).*Accepted\spassword\sfor\s(\S+)
FORMAT = myfield::Time:$1 &amp;amp; User=$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Not positive about the spaces in the FORMAT section, but it's a start.&lt;/P&gt;

&lt;P&gt;HTH&lt;/P&gt;

&lt;P&gt;Dave&lt;/P&gt;</description>
    <pubDate>Fri, 14 Feb 2014 05:27:41 GMT</pubDate>
    <dc:creator>dshpritz</dc:creator>
    <dc:date>2014-02-14T05:27:41Z</dc:date>
    <item>
      <title>Regex for filed extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-filed-extraction/m-p/150396#M42145</link>
      <description>&lt;P&gt;Feb 13 22:01:25 XXXINFQST03 sshd[9161]: Accepted password for admin from &lt;/P&gt;

&lt;P&gt;Above is the message I am getting from Linux logs from which I want to create fileds like &lt;/P&gt;

&lt;P&gt;Time:Feb 13 22:01:25 &amp;amp; User=admin  &lt;/P&gt;

&lt;P&gt;Can anyone provide me the regex for this or any other way ??&lt;/P&gt;

&lt;P&gt;Help apprecieted ..                                                             &lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2014 04:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-filed-extraction/m-p/150396#M42145</guid>
      <dc:creator>darshan_singh01</dc:creator>
      <dc:date>2014-02-14T04:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for filed extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-filed-extraction/m-p/150397#M42146</link>
      <description>&lt;P&gt;If your sourcetype is syslog, and you have &lt;A href="http://apps.splunk.com/app/833/"&gt;Splunk_TA_nix&lt;/A&gt; installed, you should get the user information that you want. If you really want it all in one field, you could try this in your props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mysourcetype]
REPORT-myfield = myfield
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then in your transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[myfield]
REGEX = (\w{3}\s+\d+\s+\d{2}:\d{2}:\d{2}).*Accepted\spassword\sfor\s(\S+)
FORMAT = myfield::Time:$1 &amp;amp; User=$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Not positive about the spaces in the FORMAT section, but it's a start.&lt;/P&gt;

&lt;P&gt;HTH&lt;/P&gt;

&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2014 05:27:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-filed-extraction/m-p/150397#M42146</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2014-02-14T05:27:41Z</dc:date>
    </item>
  </channel>
</rss>

