<?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: Having troubles extracting a time stamp. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Having-troubles-extracting-a-time-stamp/m-p/339854#M62701</link>
    <description>&lt;P&gt;I used your sample data and came up with the following:&lt;BR /&gt;
REG for time_prefix = ^.+?-.+?-\s+"&lt;BR /&gt;
When I uploaded the file, splunk automatically sensed the epoch timestamp, but I always specify time format and time prefix, so I cam up with the following:&lt;/P&gt;

&lt;P&gt;[timestamp_test]&lt;BR /&gt;
DATETIME_CONFIG = &lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 32&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
TIME_FORMAT = %s&lt;BR /&gt;
TIME_PREFIX = ^.+?-.+?-\s+"&lt;BR /&gt;
TZ = UTC&lt;BR /&gt;
category = Custom&lt;BR /&gt;
pulldown_type = true&lt;/P&gt;

&lt;P&gt;HTH&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:47:54 GMT</pubDate>
    <dc:creator>sshelly_splunk</dc:creator>
    <dc:date>2020-09-29T15:47:54Z</dc:date>
    <item>
      <title>Having troubles extracting a time stamp.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-troubles-extracting-a-time-stamp/m-p/339853#M62700</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;

&lt;P&gt;I'm having an issue with my environment while trying to index a set of logs i get from a file nightly and attempt to process them. what is happening is splunk is not finding the timestamp and either setting it as file mod time or at index time. I do not have this issue with the other logs sent from this same server.(syslog server sending many logs). At the bottom are 3 log lines as an example.&lt;/P&gt;

&lt;P&gt;I'm trying to extract the epoch timestamp from the start of the line. AV - Alert - "&lt;STRONG&gt;1504324797&lt;/STRONG&gt;" --&amp;gt; i'm not seeing any failed to parse timestamp errors so i'm confused as to why this is being bypassed and setting it to the file mod time or index time.&lt;/P&gt;

&lt;P&gt;The input stanza:&lt;BR /&gt;
[monitor:///apps/alienvault/ossec-alerts-*.log]&lt;BR /&gt;
whitelist=ossec-alerts&lt;BR /&gt;
index = test&lt;BR /&gt;
sourcetype = alienv&lt;BR /&gt;
disabled = 0&lt;/P&gt;

&lt;P&gt;Props.conf: (I've commented out the field extractions to make sure they arnt the issue.)&lt;BR /&gt;
[alienv]&lt;BR /&gt;
TIME_PREFIX = ^\w+\W+\w+\W+  I've also tried:  AV - Alert - " , -\s\" , no time prefix and others&lt;BR /&gt;
TIME_FORMAT = %s   10 digit epoch format&lt;BR /&gt;
TZ = UTC&lt;/P&gt;

&lt;H1&gt;REPORT-alienv = av-syslog-hdr, av-syslog-user, av-syslog-srcip, av-syslog-location1, av-syslog-location2, av-syslog-message&lt;/H1&gt;

&lt;H1&gt;REPORT-alienv-loc = av-syslog-location1, av-syslog-location2&lt;/H1&gt;

&lt;H1&gt;FIELDALIAS-signature = action as signature&lt;/H1&gt;

&lt;H1&gt;FIELDALIAS-src = src_ip as src&lt;/H1&gt;

&lt;H1&gt;TRANSFORMS-sev = av-syslog-sev&lt;/H1&gt;

&lt;H1&gt;TRANSFORMS-suppressions = av-win-suppress-detail&lt;/H1&gt;

&lt;P&gt;I have a distributed environment so i've placed the props.conf/transforms.conf on the indexers and search heads for search time field extractions. The indexers and search heads are version 6.5, the server i'm forwarding from uses a universal forwarder version 6.4.1&lt;/P&gt;

&lt;P&gt;Log line examples:&lt;BR /&gt;
AV - Alert - "1504324797" --&amp;gt; RID: "700008"; RL: "2"; RG: "windows,authentication_success,"; RC: "A Kerberos service ticket was requested: Success."; USER: "&lt;A href="mailto:user@server.com" target="_blank"&gt;user@server.com&lt;/A&gt;"; SRCIP: "None"; HOSTNAME: "(Host-xxx-xxx-xxx-xxx) xxx-xxx-xxx-xxx-&amp;gt;WinEvtLog"; LOCATION: "(Host-xxx-xxx-xxx-xxx) xxx-xxx-xxx-xxx-&amp;gt;WinEvtLog"; EVENT: "[INIT]2017 Sep 02 00:00:02 WinEvtLog: Security: AUDIT_SUCCESS(4769): Microsoft-Windows-Security-Auditing: &lt;A href="mailto:user@server.com" target="_blank"&gt;user@server.com&lt;/A&gt;: server.domain: server.domain: A Kerberos service ticket was requested. Account Information:  Account Name:  &lt;A href="mailto:user@server.com" target="_blank"&gt;user@server.com&lt;/A&gt;  Account Domain:  server.domain  Logon GUID:  {5DDE4BE2-4A37-D51B-77F1-CDFE96B24E23}  Service Information:  Service Name:  krbtgt  Service ID:  S-1-5-21-2277870611-162051517-1830794436-502  Network Information:  Client Address:  xxx.xxx.xxx.xxx  Client Port:  65168  Additional Information:  Ticket Options:  0x40810000  Ticket Encryption Type: 0x12  Failure Code:  0x0  Transited Services: -  This event is generated every time access is requested to a resource such as a computer or a Windows service.  The service name indicates the resource to which access was requested.  [END]";&lt;BR /&gt;
AV - Alert - "1504324797" --&amp;gt; RID: "700008"; RL: "2"; RG: "windows,authentication_success,"; RC: "A Kerberos service ticket was requested: Success."; USER: "&lt;A href="mailto:user@server.com" target="_blank"&gt;user@server.com&lt;/A&gt;"; SRCIP: "None"; HOSTNAME: "(Host-xxx-xxx-xxx-xxx) xxx-xxx-xxx-xxx-&amp;gt;WinEvtLog"; LOCATION: "(Host-xxx-xxx-xxx-xxx) xxx-xxx-xxx-xxx-&amp;gt;WinEvtLog"; EVENT: "[INIT]2017 Sep 02 00:00:02 WinEvtLog: Security: AUDIT_SUCCESS(4769): Microsoft-Windows-Security-Auditing: &lt;A href="mailto:user@server.com" target="_blank"&gt;user@server.com&lt;/A&gt;: server.domain: server.domain: A Kerberos service ticket was requested. Account Information:  Account Name:  &lt;A href="mailto:user@server.com" target="_blank"&gt;user@server.com&lt;/A&gt;  Account Domain:  server.domain  Logon GUID:  {5DDE4BE2-4A37-D51B-77F1-CDFxxxxxxxxx}  Service Information:  Service Name:  service$  Service ID:  S-1-5-21-2277870611-162051517-1830794436-1296  Network Information:  Client Address:  xxx.xxx.xxx.xxx  Client Port:  65170  Additional Information:  Ticket Options:  0x40810000  Ticket Encryption Type: 0x12  Failure Code:  0x0  Transited Services: -  This event is generated every time access is requested to a resource such as a computer or a Windows service.  The service name indicates the resource to which access was requested.  [END]";&lt;BR /&gt;
AV - Alert - "1504324797" --&amp;gt; RID: "700008"; RL: "2"; RG: "windows,authentication_success,"; RC: "A Kerberos service ticket was requested: Success."; USER: "&lt;A href="mailto:user@server.com" target="_blank"&gt;user@server.com&lt;/A&gt;"; SRCIP: "None"; HOSTNAME: "(Host-xxx-xxx-xxx-xxx) xxx-xxx-xxx-xxx-&amp;gt;WinEvtLog"; LOCATION: "(Host-xxx-xxx-xxx-xxx) xxx-xxx-xxx-xxx-&amp;gt;WinEvtLog"; EVENT: "[INIT]2017 Sep 02 00:00:02 WinEvtLog: Security: AUDIT_SUCCESS(4769): Microsoft-Windows-Security-Auditing: &lt;A href="mailto:user@server.com" target="_blank"&gt;user@server.com&lt;/A&gt;: server.domain: server.domain: A Kerberos service ticket was requested. Account Information:  Account Name:  &lt;A href="mailto:user@server.com" target="_blank"&gt;user@server.com&lt;/A&gt;  Account Domain:  server.domain  Logon GUID:  {5DDE4BE2-4A37-D51B-77F1-CDFxxxxxxxxx}  Service Information:  Service Name:  service$  Service ID:  S-1-5-21-2277870611-162051517-183079xxxx-xxxx  Network Information:  Client Address:  xxx.xxx.xxx.xxx  Client Port:  65169  Additional Information:  Ticket Options:  0x40810000  Ticket Encryption Type: 0x12  Failure Code:  0x0  Transited Services: -  This event is generated every time access is requested to a resource such as a computer or a Windows service.  The service name indicates the resource to which access was requested.  [END]";&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:47:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-troubles-extracting-a-time-stamp/m-p/339853#M62700</guid>
      <dc:creator>cliffton_merz</dc:creator>
      <dc:date>2020-09-29T15:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Having troubles extracting a time stamp.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-troubles-extracting-a-time-stamp/m-p/339854#M62701</link>
      <description>&lt;P&gt;I used your sample data and came up with the following:&lt;BR /&gt;
REG for time_prefix = ^.+?-.+?-\s+"&lt;BR /&gt;
When I uploaded the file, splunk automatically sensed the epoch timestamp, but I always specify time format and time prefix, so I cam up with the following:&lt;/P&gt;

&lt;P&gt;[timestamp_test]&lt;BR /&gt;
DATETIME_CONFIG = &lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 32&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
TIME_FORMAT = %s&lt;BR /&gt;
TIME_PREFIX = ^.+?-.+?-\s+"&lt;BR /&gt;
TZ = UTC&lt;BR /&gt;
category = Custom&lt;BR /&gt;
pulldown_type = true&lt;/P&gt;

&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:47:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-troubles-extracting-a-time-stamp/m-p/339854#M62701</guid>
      <dc:creator>sshelly_splunk</dc:creator>
      <dc:date>2020-09-29T15:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Having troubles extracting a time stamp.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-troubles-extracting-a-time-stamp/m-p/339855#M62702</link>
      <description>&lt;P&gt;Hey @cliffont_merz, if @sshelly solved your problem, remember to "√Accept" an answer to award karma points &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 22:56:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-troubles-extracting-a-time-stamp/m-p/339855#M62702</guid>
      <dc:creator>lfedak_splunk</dc:creator>
      <dc:date>2017-09-15T22:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Having troubles extracting a time stamp.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-troubles-extracting-a-time-stamp/m-p/339856#M62703</link>
      <description>&lt;P&gt;Did you do this through the GUI via input data? If so i had forgot to mention that splunk found the timestamp that way. but not when sent from the forwarder. I will also try these options and report back some time over the weekend.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Sep 2017 05:25:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-troubles-extracting-a-time-stamp/m-p/339856#M62703</guid>
      <dc:creator>cliffton_merz</dc:creator>
      <dc:date>2017-09-16T05:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Having troubles extracting a time stamp.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-troubles-extracting-a-time-stamp/m-p/339857#M62704</link>
      <description>&lt;P&gt;This worked, thank you very much. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 13:22:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-troubles-extracting-a-time-stamp/m-p/339857#M62704</guid>
      <dc:creator>cliffton_merz</dc:creator>
      <dc:date>2017-09-18T13:22:50Z</dc:date>
    </item>
  </channel>
</rss>

