<?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: Timestamp issue with Fortigate Logs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61368#M12213</link>
    <description>&lt;OL&gt;
&lt;LI&gt; Check that the sourcetype has not changed since applying the new setting, Splunk may have learned a new sourcetype.&lt;/LI&gt;
&lt;LI&gt;The TIME_FORMAT string should define the string that follows the TIME_PREFIX string.&lt;/LI&gt;
&lt;LI&gt;Remember that strftime format strings are not regular expressions so you cannot use things like \s+ to represent spaces.  However the TIME_PREFIX string is a regular expression.&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Is the character between the "date" and "time" string definitely a space?  You can check with the od command on linux:&lt;/P&gt;

&lt;P&gt;grep "date=" logFileName | head -1 | od -b&lt;/P&gt;

&lt;P&gt;and make sure the the space character is octal 40.  It could be a tab (octal 11) or Hard-Space character (octal 240)&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Be careful copy/pasting from web&lt;BR /&gt;
pages as some characters (i.e. '-')&lt;BR /&gt;
can get changed to different,&lt;BR /&gt;
similar looking characters.&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Given the above checks out, the following should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = date=%Y-%m-%d time=%H:%M:%S
TIME_PREFIX = ^\s*&amp;lt;\d{3}&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 28 Sep 2020 12:27:26 GMT</pubDate>
    <dc:creator>itinney</dc:creator>
    <dc:date>2020-09-28T12:27:26Z</dc:date>
    <item>
      <title>Timestamp issue with Fortigate Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61364#M12209</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I receive Fortigate Firewall Logs via Syslog. &lt;BR /&gt;
To separte the Logs into different facilities I've enabled the &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;no_priority_stripping=true&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Now Splunk can't determine the correct timestamp, but there are fields named date and time available.  For Example here is the beginning of a received message:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;173&amp;gt;date=2012-09-17 time=15:38:14 ........&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;What are the correct settings for the props.conf ?&lt;/P&gt;

&lt;P&gt;I tried things like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[mysourcetype]&lt;BR /&gt;
TIME_FORMAT = date=%Y-%m-%d time=%H:%M:%S&lt;BR /&gt;
TIME_PREFIX = date=&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Do you have any comments on this ?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Torsten&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2012 13:31:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61364#M12209</guid>
      <dc:creator>tjensen</dc:creator>
      <dc:date>2012-09-17T13:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp issue with Fortigate Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61365#M12210</link>
      <description>&lt;P&gt;Hi tjensen,&lt;/P&gt;

&lt;P&gt;You can refer to following documentation to configure timestamp recognition :&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.4/Data/Configuretimestamprecognition"&gt;Configure Timestamp Recognition&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks !!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2012 13:40:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61365#M12210</guid>
      <dc:creator>ranjyotiprakash</dc:creator>
      <dc:date>2012-09-17T13:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp issue with Fortigate Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61366#M12211</link>
      <description>&lt;P&gt;Hi ranjyotiprakash,&lt;/P&gt;

&lt;P&gt;thanks for your fast answer. &lt;BR /&gt;
Meanwhile I take a look at this part of the docs many time, but I don't find a solution for this problem. &lt;/P&gt;

&lt;P&gt;I tested also the following settings:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
1st: &lt;BR /&gt;
TIME_FORMAT = date=%Y-%m-%d%ttime=%H:%M:%S&lt;BR /&gt;
TIME_PREFIX = ^&amp;lt;/d{3}&amp;gt;date=&lt;BR /&gt;
2nd:&lt;BR /&gt;
TIME_FORMAT = %H:%M:%S&lt;BR /&gt;
TIME_PREFIX = time=&lt;BR /&gt;
3rd:&lt;BR /&gt;
TIME_PREFIX = \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}&lt;BR /&gt;
TIME_FORMAT = %m/%d/%y %H:%M:%S&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;but no success at all. So I think, the 2nd try should be works fine, but it don't. &lt;/P&gt;

&lt;P&gt;Any comments ?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2012 14:19:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61366#M12211</guid>
      <dc:creator>tjensen</dc:creator>
      <dc:date>2012-09-17T14:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp issue with Fortigate Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61367#M12212</link>
      <description>&lt;P&gt;if you still can't get timestamp recognised you can create a custom datetime.xml:&lt;/P&gt;

&lt;P&gt;-by using ./splunk train date&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;-or configuring the custom datetime.xml: &lt;A href="http://splunk-base.splunk.com/answers/10301/extract-date-using-datetimexml"&gt;example&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 07:21:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61367#M12212</guid>
      <dc:creator>MarioM</dc:creator>
      <dc:date>2012-09-18T07:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp issue with Fortigate Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61368#M12213</link>
      <description>&lt;OL&gt;
&lt;LI&gt; Check that the sourcetype has not changed since applying the new setting, Splunk may have learned a new sourcetype.&lt;/LI&gt;
&lt;LI&gt;The TIME_FORMAT string should define the string that follows the TIME_PREFIX string.&lt;/LI&gt;
&lt;LI&gt;Remember that strftime format strings are not regular expressions so you cannot use things like \s+ to represent spaces.  However the TIME_PREFIX string is a regular expression.&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Is the character between the "date" and "time" string definitely a space?  You can check with the od command on linux:&lt;/P&gt;

&lt;P&gt;grep "date=" logFileName | head -1 | od -b&lt;/P&gt;

&lt;P&gt;and make sure the the space character is octal 40.  It could be a tab (octal 11) or Hard-Space character (octal 240)&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Be careful copy/pasting from web&lt;BR /&gt;
pages as some characters (i.e. '-')&lt;BR /&gt;
can get changed to different,&lt;BR /&gt;
similar looking characters.&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Given the above checks out, the following should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = date=%Y-%m-%d time=%H:%M:%S
TIME_PREFIX = ^\s*&amp;lt;\d{3}&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:27:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61368#M12213</guid>
      <dc:creator>itinney</dc:creator>
      <dc:date>2020-09-28T12:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp issue with Fortigate Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61369#M12214</link>
      <description>&lt;P&gt;Hi, thanks for all your help. &lt;/P&gt;

&lt;P&gt;I find the following solution for my problem:&lt;/P&gt;

&lt;P&gt;The sourcetype was created by a transformation from a other sourcetype. &lt;BR /&gt;
Splunk try at first to find the timestamp and after that the transforms will be managed. &lt;BR /&gt;
For this my settings in the props.conf are not parsed during the timestamp creation. &lt;/P&gt;

&lt;P&gt;Now I changed my settings from sourcetype to host and it works without any problems. &lt;/P&gt;

&lt;P&gt;This issue is solved now!&lt;/P&gt;

&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 10:00:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61369#M12214</guid>
      <dc:creator>tjensen</dc:creator>
      <dc:date>2012-09-18T10:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp issue with Fortigate Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61370#M12215</link>
      <description>&lt;P&gt;This worked for me as well, thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2012 14:07:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-issue-with-Fortigate-Logs/m-p/61370#M12215</guid>
      <dc:creator>bfernandez</dc:creator>
      <dc:date>2012-10-02T14:07:33Z</dc:date>
    </item>
  </channel>
</rss>

