<?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 How to configure timestamp and other data formatting for multiline Exchange Autodiscover logs? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-timestamp-and-other-data-formatting-for/m-p/187509#M37462</link>
    <description>&lt;P&gt;I have been asked to take on some logs which have a predictable format but which on a one-shot test input shows that Splunk hasn't figured them out. Here is a sample log entry, which is multi-line:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;20141021_150239.928_128.200.22.13: Request Begin. User Agent: Microsoft Office/14.0 (Windows NT 6.1; Microsoft Outlook 14.0.7128; Pro)
20141021_150239.928_128.200.22.13: XML Message: &amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&amp;lt;Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"&amp;gt;&amp;lt;Request&amp;gt;&amp;lt;EMailAddress&amp;gt;bvarela@uci.edu&amp;lt;/EMailAddress&amp;gt;&amp;lt;AcceptableResponseSchema&amp;gt;http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a&amp;lt;/AcceptableResponseSchema&amp;gt;&amp;lt;/Request&amp;gt;&amp;lt;/Autodiscover&amp;gt;
20141021_150239.928_128.200.22.13: **** Start Header Dump ****
20141021_150239.928_128.200.22.13:  Cache-Control: no-cache
20141021_150239.928_128.200.22.13:  Connection: Keep-Alive
20141021_150239.928_128.200.22.13:  Pragma: no-cache
20141021_150239.928_128.200.22.13:  Content-Length: 348
20141021_150239.928_128.200.22.13:  Content-Type: text/xml
20141021_150239.928_128.200.22.13:  Cookie: OutlookSession="{54AE4359-2E0C-4A13-9486-1DD48DAD6B66}"
20141021_150239.928_128.200.22.13:  Host: autodiscover.uci.edu
20141021_150239.928_128.200.22.13:  User-Agent: Microsoft Office/14.0 (Windows NT 6.1; Microsoft Outlook 14.0.7128; Pro)
20141021_150239.928_128.200.22.13:  X-User-Identity: bvarela@uci.edu
20141021_150239.928_128.200.22.13:  Depth: 0
20141021_150239.928_128.200.22.13: **** End Header Dump ****
20141021_150239.928_128.200.22.13: Email address "bvarela@uci.edu" retrieved from XML request.
20141021_150239.928_128.200.22.13: Request: bvarela@uci.edu; Redirect: bvarela@exchange.uci.edu
20141021_150239.928_128.200.22.13: End Request. Took 44ms.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Using Splunk &amp;gt; Manager &amp;gt;&amp;gt; Data Inputs &amp;gt;&amp;gt; Files &amp;amp; Directories &amp;gt;&amp;gt; Data Preview I was able to &lt;EM&gt;Specify a pattern or regex to break before&lt;/EM&gt; and this is the regex that I gave it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(\d{8}_\d{1,6}\.\d{3}_)(\d{1,3}\.){3}\d{1,3}: Request Begin\.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This resulted in this (1st record)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1   10/14/01 4:15:28.000 PM 
20141021_150239.928_128.200.22.13: Request Begin. User Agent: Microsoft Office/14.0 (Windows NT 6.1; Microsoft Outlook 14.0.7128; Pro)
20141021_150239.928_128.200.22.13: XML Message: &amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&amp;lt;Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"&amp;gt;&amp;lt;Request&amp;gt;&amp;lt;EMailAddress&amp;gt;bvarela@uci.edu&amp;lt;/EMailAddress&amp;gt;&amp;lt;AcceptableResponseSchema&amp;gt;http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a&amp;lt;/AcceptableResponseSchema&amp;gt;&amp;lt;/Request&amp;gt;&amp;lt;/Autodiscover&amp;gt;
20141021_150239.928_128.200.22.13: **** Start Header Dump ****
20141021_150239.928_128.200.22.13:  Cache-Control: no-cache
20141021_150239.928_128.200.22.13:  Connection: Keep-Alive
20141021_150239.928_128.200.22.13:  Pragma: no-cache
20141021_150239.928_128.200.22.13:  Content-Length: 348
20141021_150239.928_128.200.22.13:  Content-Type: text/xml
20141021_150239.928_128.200.22.13:  Cookie: OutlookSession="{54AE4359-2E0C-4A13-9486-1DD48DAD6B66}"
20141021_150239.928_128.200.22.13:  Host: autodiscover.uci.edu
20141021_150239.928_128.200.22.13:  User-Agent: Microsoft Office/14.0 (Windows NT 6.1; Microsoft Outlook 14.0.7128; Pro)
20141021_150239.928_128.200.22.13:  X-User-Identity: bvarela@uci.edu
20141021_150239.928_128.200.22.13:  Depth: 0
20141021_150239.928_128.200.22.13: **** End Header Dump ****
20141021_150239.928_128.200.22.13: Email address "bvarela@uci.edu" retrieved from XML request.
20141021_150239.928_128.200.22.13: Request: bvarela@uci.edu; Redirect: bvarela@exchange.uci.edu
20141021_150239.928_128.200.22.13: End Request. Took 44ms.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The format of the time/date-stamp &amp;amp; IP before each colon is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YYYYmmdd_(24hr)(min)(sec).(millisec)_(ipnumber)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or, put another way&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YYYYmmdd_HHMMss.mmm_(ipnumber)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So in this last example (20141021_150239.928_128.200.22.13) we would be expecting 10/21/2014 3:02:39.928 PM for the timestamp, but Splunk is not getting this. Plus, it would be nice if I could reformat the IP as being a separate field, removing the '_'  and having IP=128.200.22.13, and also would be great to drop redundant headers through the remainder of the log entry.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 18:02:24 GMT</pubDate>
    <dc:creator>wrangler2x</dc:creator>
    <dc:date>2020-09-28T18:02:24Z</dc:date>
    <item>
      <title>How to configure timestamp and other data formatting for multiline Exchange Autodiscover logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-timestamp-and-other-data-formatting-for/m-p/187509#M37462</link>
      <description>&lt;P&gt;I have been asked to take on some logs which have a predictable format but which on a one-shot test input shows that Splunk hasn't figured them out. Here is a sample log entry, which is multi-line:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;20141021_150239.928_128.200.22.13: Request Begin. User Agent: Microsoft Office/14.0 (Windows NT 6.1; Microsoft Outlook 14.0.7128; Pro)
20141021_150239.928_128.200.22.13: XML Message: &amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&amp;lt;Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"&amp;gt;&amp;lt;Request&amp;gt;&amp;lt;EMailAddress&amp;gt;bvarela@uci.edu&amp;lt;/EMailAddress&amp;gt;&amp;lt;AcceptableResponseSchema&amp;gt;http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a&amp;lt;/AcceptableResponseSchema&amp;gt;&amp;lt;/Request&amp;gt;&amp;lt;/Autodiscover&amp;gt;
20141021_150239.928_128.200.22.13: **** Start Header Dump ****
20141021_150239.928_128.200.22.13:  Cache-Control: no-cache
20141021_150239.928_128.200.22.13:  Connection: Keep-Alive
20141021_150239.928_128.200.22.13:  Pragma: no-cache
20141021_150239.928_128.200.22.13:  Content-Length: 348
20141021_150239.928_128.200.22.13:  Content-Type: text/xml
20141021_150239.928_128.200.22.13:  Cookie: OutlookSession="{54AE4359-2E0C-4A13-9486-1DD48DAD6B66}"
20141021_150239.928_128.200.22.13:  Host: autodiscover.uci.edu
20141021_150239.928_128.200.22.13:  User-Agent: Microsoft Office/14.0 (Windows NT 6.1; Microsoft Outlook 14.0.7128; Pro)
20141021_150239.928_128.200.22.13:  X-User-Identity: bvarela@uci.edu
20141021_150239.928_128.200.22.13:  Depth: 0
20141021_150239.928_128.200.22.13: **** End Header Dump ****
20141021_150239.928_128.200.22.13: Email address "bvarela@uci.edu" retrieved from XML request.
20141021_150239.928_128.200.22.13: Request: bvarela@uci.edu; Redirect: bvarela@exchange.uci.edu
20141021_150239.928_128.200.22.13: End Request. Took 44ms.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Using Splunk &amp;gt; Manager &amp;gt;&amp;gt; Data Inputs &amp;gt;&amp;gt; Files &amp;amp; Directories &amp;gt;&amp;gt; Data Preview I was able to &lt;EM&gt;Specify a pattern or regex to break before&lt;/EM&gt; and this is the regex that I gave it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(\d{8}_\d{1,6}\.\d{3}_)(\d{1,3}\.){3}\d{1,3}: Request Begin\.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This resulted in this (1st record)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1   10/14/01 4:15:28.000 PM 
20141021_150239.928_128.200.22.13: Request Begin. User Agent: Microsoft Office/14.0 (Windows NT 6.1; Microsoft Outlook 14.0.7128; Pro)
20141021_150239.928_128.200.22.13: XML Message: &amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&amp;lt;Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"&amp;gt;&amp;lt;Request&amp;gt;&amp;lt;EMailAddress&amp;gt;bvarela@uci.edu&amp;lt;/EMailAddress&amp;gt;&amp;lt;AcceptableResponseSchema&amp;gt;http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a&amp;lt;/AcceptableResponseSchema&amp;gt;&amp;lt;/Request&amp;gt;&amp;lt;/Autodiscover&amp;gt;
20141021_150239.928_128.200.22.13: **** Start Header Dump ****
20141021_150239.928_128.200.22.13:  Cache-Control: no-cache
20141021_150239.928_128.200.22.13:  Connection: Keep-Alive
20141021_150239.928_128.200.22.13:  Pragma: no-cache
20141021_150239.928_128.200.22.13:  Content-Length: 348
20141021_150239.928_128.200.22.13:  Content-Type: text/xml
20141021_150239.928_128.200.22.13:  Cookie: OutlookSession="{54AE4359-2E0C-4A13-9486-1DD48DAD6B66}"
20141021_150239.928_128.200.22.13:  Host: autodiscover.uci.edu
20141021_150239.928_128.200.22.13:  User-Agent: Microsoft Office/14.0 (Windows NT 6.1; Microsoft Outlook 14.0.7128; Pro)
20141021_150239.928_128.200.22.13:  X-User-Identity: bvarela@uci.edu
20141021_150239.928_128.200.22.13:  Depth: 0
20141021_150239.928_128.200.22.13: **** End Header Dump ****
20141021_150239.928_128.200.22.13: Email address "bvarela@uci.edu" retrieved from XML request.
20141021_150239.928_128.200.22.13: Request: bvarela@uci.edu; Redirect: bvarela@exchange.uci.edu
20141021_150239.928_128.200.22.13: End Request. Took 44ms.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The format of the time/date-stamp &amp;amp; IP before each colon is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YYYYmmdd_(24hr)(min)(sec).(millisec)_(ipnumber)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or, put another way&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YYYYmmdd_HHMMss.mmm_(ipnumber)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So in this last example (20141021_150239.928_128.200.22.13) we would be expecting 10/21/2014 3:02:39.928 PM for the timestamp, but Splunk is not getting this. Plus, it would be nice if I could reformat the IP as being a separate field, removing the '_'  and having IP=128.200.22.13, and also would be great to drop redundant headers through the remainder of the log entry.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:02:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-timestamp-and-other-data-formatting-for/m-p/187509#M37462</guid>
      <dc:creator>wrangler2x</dc:creator>
      <dc:date>2020-09-28T18:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure timestamp and other data formatting for multiline Exchange Autodiscover logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-timestamp-and-other-data-formatting-for/m-p/187510#M37463</link>
      <description>&lt;P&gt;Give this a try (either in props.conf directly OR in  Data Preview -&amp;gt; Advanced mode)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;BREAK_ONLY_BEFORE=(\d{8}_\d{1,6}\.\d{3}_)(\d{1,3}\.){3}\d{1,3}: Request Begin\.
MAX_TIMESTAMP_LOOKAHEAD=25
NO_BINARY_CHECK=1
SEDCMD-ipaddr=s/(\d{8}_\d{6}\.\d{3})_(.*)/\1 IP=\2/
SEDCMD-removeextra=s/(\d{8}_\d{6}\.\d{3}_\d+\.\d+\.\d+\.\d+\:\s*)//g
SHOULD_LINEMERGE=true
TIME_FORMAT=%Y%m%d_%H%M%S.%3Q_
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Oct 2014 22:03:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-timestamp-and-other-data-formatting-for/m-p/187510#M37463</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-10-28T22:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure timestamp and other data formatting for multiline Exchange Autodiscover logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-timestamp-and-other-data-formatting-for/m-p/187511#M37464</link>
      <description>&lt;P&gt;This works brilliantly except the SEDCMD-ipaddr sed command. After much head scratching I realized that the equal sign in the replace string was causing the sed to fail. Then, of course, the SEDCMD-removeextra sed command removed all, leaving no IP address at all.&lt;/P&gt;

&lt;P&gt;I can use IP: and it works fine. Is there some way to include the = sign though? I tried this in regular sed on linux and it had no problem with the = sign, so it must be unique to splunk.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Nov 2014 00:38:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-timestamp-and-other-data-formatting-for/m-p/187511#M37464</guid>
      <dc:creator>wrangler2x</dc:creator>
      <dc:date>2014-11-07T00:38:12Z</dc:date>
    </item>
  </channel>
</rss>

