<?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: Extracting fields from different syslog messages using props.conf transforms.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-different-syslog-messages-using-props/m-p/178611#M35815</link>
    <description>&lt;P&gt;Thank you !,&lt;/P&gt;</description>
    <pubDate>Fri, 08 May 2015 19:17:05 GMT</pubDate>
    <dc:creator>Thuan</dc:creator>
    <dc:date>2015-05-08T19:17:05Z</dc:date>
    <item>
      <title>Extracting fields from different syslog messages using props.conf transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-different-syslog-messages-using-props/m-p/178609#M35813</link>
      <description>&lt;P&gt;The syslog messages we receive from the firewall have multiple formats.  A limited sample is listed below&lt;/P&gt;

&lt;P&gt;Apr 30 15:26:20 147.81.86.22 %ASA-4-313004: Denied ICMP type=0, from laddr 10.11.20.59 on interface outside to 147.81.104.109: no matching session&lt;BR /&gt;
Apr 29 13:39:31 147.81.86.22 %ASA-6-605004: Login denied from 72.81.224.40/63508 to inside:72.81.86.22/ssh for user "dstrollo"&lt;BR /&gt;
Apr 28 13:58:47 147.81.37.241 %ASA-3-710003: TCP access denied by ACL from 45.64.188.70/48986 to Internet:72.83.128.9/23&lt;/P&gt;

&lt;P&gt;Our requirement is to be able to extract all the fields in these messages for our analysts.&lt;/P&gt;

&lt;P&gt;My question is whether the configuration below will work.  If it doesn't it may mess up the existing index.  Any advice will be much appreciated.&lt;/P&gt;

&lt;P&gt;In props.conf, I set up a basic search to extract the syslog message in each record.  The results are listed below&lt;/P&gt;

&lt;P&gt;Denied ICMP type=0, from laddr 10.11.20.59 on interface outside to 147.81.104.109: no matching session&lt;BR /&gt;
Login denied from 72.81.224.40/63508 to inside:72.81.86.22/ssh for user "dstrollo"&lt;BR /&gt;
TCP access denied by ACL from 45.64.188.70/48986 to Internet:72.83.128.9/23&lt;/P&gt;

&lt;P&gt;The props.conf is listed below&lt;/P&gt;

&lt;P&gt;[syslog]&lt;/P&gt;

&lt;H1&gt;-------&lt;/H1&gt;

&lt;P&gt;NO_BINARY_CHECK = 1&lt;BR /&gt;
pulldown_type = 1&lt;BR /&gt;
BREAK_ONLY_BEFORE_DATE = false&lt;BR /&gt;
TIME_PREFIX = ^&lt;/P&gt;

&lt;H1&gt;%Y = year, %m = month, %d = day, %H = hour, %M = minute, %S = seconds, %z = time zone offset&lt;/H1&gt;

&lt;H1&gt;example = 2015-03-25T16:22:01-04:00&lt;/H1&gt;

&lt;H1&gt;the - ( in -4:00 =&amp;gt; %z ) is part of the timezone specification (UTC-04:00 versus UTC+04:00)&lt;/H1&gt;

&lt;P&gt;TIME_FORMAT = %Y-%m-%dT%H:%M:%S%z&lt;BR /&gt;
EXTRACT-syslog = \s(?[^\s]+)\s(?[^:]+:)\s(?.+)&lt;/P&gt;

&lt;P&gt;Then I use different transforms to process each message type separately at search time&lt;/P&gt;

&lt;P&gt;In props.conf&lt;/P&gt;

&lt;P&gt;[syslog]&lt;BR /&gt;
....&lt;BR /&gt;
EXTRACT-syslog = "as above"&lt;BR /&gt;
REPORT-SyslogMsg = SyslogMsg1, SyslogMsg2, SyslogMsg3&lt;/P&gt;

&lt;P&gt;In trasnforms.conf&lt;/P&gt;

&lt;P&gt;[SyslogMsg1]&lt;BR /&gt;
REGEX = "extract fields in Msg1"&lt;/P&gt;

&lt;P&gt;SyslogMsg2&lt;BR /&gt;
REGEX = "extract fields in Msg2"&lt;/P&gt;

&lt;P&gt;SyslogMsg3&lt;BR /&gt;
REGEX = "extract fields in Msg3"&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:48:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-different-syslog-messages-using-props/m-p/178609#M35813</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2020-09-28T19:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from different syslog messages using props.conf transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-different-syslog-messages-using-props/m-p/178610#M35814</link>
      <description>&lt;P&gt;It will work and even if it doesn't, because you are using the "REPORT-" directive (Search-time) instead of the "TRANSFORMS-" (or "EXTRACT-") directive (Index-time), it will not do any permanent modifications so there is no risk.  Is there really missing backslashes for this transform or did you just mess up the markdown for it:&lt;/P&gt;

&lt;P&gt;I would make sure each of your 3 REGEX strings contains the string literal text for each individual message variation to avoid false extractions (e.g. "ASA-4-313004", "ASA-6-605004", and "ASA-3-710003").&lt;/P&gt;

&lt;P&gt;P.S.  You do not need the "EXTRACT-syslog" more than once.&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2015 13:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-different-syslog-messages-using-props/m-p/178610#M35814</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-02T13:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from different syslog messages using props.conf transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-different-syslog-messages-using-props/m-p/178611#M35815</link>
      <description>&lt;P&gt;Thank you !,&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2015 19:17:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-different-syslog-messages-using-props/m-p/178611#M35815</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2015-05-08T19:17:05Z</dc:date>
    </item>
  </channel>
</rss>

