<?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: datetime.xml  problem with a word &amp;quot;hour&amp;quot; in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52375#M10080</link>
    <description>&lt;P&gt;Thanks Tgow, but I tried it in both.&lt;/P&gt;</description>
    <pubDate>Sat, 31 Aug 2013 23:28:05 GMT</pubDate>
    <dc:creator>davecroto</dc:creator>
    <dc:date>2013-08-31T23:28:05Z</dc:date>
    <item>
      <title>datetime.xml  problem with a word "hour"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52372#M10077</link>
      <description>&lt;P&gt;I have a non - standard, Adobe / Omniture log standard timestamp that I want to extract.  The value after the word Hour is the actual hour of the day in military time so 0 is between 12 and 1am...and so on and so forth til hour 23.  Don't care about minutes or seconds.&lt;/P&gt;

&lt;P&gt;Error logs are not spitting out any useful info, but it is not pulling out the timestamp.&lt;/P&gt;

&lt;P&gt;Example 1: "August 13, 2013", Hour 0 foobar:A   1&lt;/P&gt;

&lt;P&gt;Example 2: "August 13, 2013", Hour 1 300:A general &lt;/P&gt;

&lt;P&gt;here is my complete datetime.xml&lt;BR /&gt;
&lt;DATETIME&gt;&lt;BR /&gt;
&lt;DEFINE name="_combdatetime" extract="month, day, year, hour"&gt;&lt;BR /&gt;
        &lt;TEXT&gt;&amp;lt;![CDATA[\"(\w+)\s+(\d{1,2})\,\s+(\d{4})\,\s+Hour\s+(\d{1,2})\"\,\s+]&amp;gt;&lt;/TEXT&gt;&lt;BR /&gt;
&lt;/DEFINE&gt;&lt;BR /&gt;
&lt;TIMEPATTERNS&gt;&lt;BR /&gt;
      &lt;USE name="_combdatetime"&gt;&lt;/USE&gt;&lt;BR /&gt;
&lt;/TIMEPATTERNS&gt;&lt;BR /&gt;
&lt;DATEPATTERNS&gt;&lt;BR /&gt;
      &lt;USE name="_combdatetime"&gt;&lt;/USE&gt;&lt;BR /&gt;
&lt;/DATEPATTERNS&gt;&lt;BR /&gt;
&lt;/DATETIME&gt;&lt;/P&gt;

&lt;P&gt;Why is this not working?  I hard coded the actual Month "August" to test make sure it was not my regex, but timestamp is still wrong.&lt;/P&gt;

&lt;P&gt;Here is my props.conf:&lt;/P&gt;

&lt;P&gt;[timestamp]&lt;BR /&gt;
NO_BINARY_CHECK = 1 &lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 2&lt;BR /&gt;
DATETIME_CONFIG = /etc/system/local/datetime.xml&lt;/P&gt;

&lt;P&gt;TIME_FORMAT = %B %d, %Y, Hour %H doesn't like the hour either.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:41:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52372#M10077</guid>
      <dc:creator>davecroto</dc:creator>
      <dc:date>2020-09-28T14:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: datetime.xml  problem with a word "hour"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52373#M10078</link>
      <description>&lt;P&gt;added SHOULD_LINEMERGE = false and it split it up, but still not the right timestamp&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2013 23:11:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52373#M10078</guid>
      <dc:creator>davecroto</dc:creator>
      <dc:date>2013-08-30T23:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: datetime.xml  problem with a word "hour"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52374#M10079</link>
      <description>&lt;P&gt;Instead of having the datetime.xml file in the /etc/system/default/ directory I am wondering if you put it in the local directory and it will work:&lt;/P&gt;

&lt;P&gt;DATETIME_CONFIG = /etc/system/local/datetime.xml&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2013 13:29:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52374#M10079</guid>
      <dc:creator>tgow</dc:creator>
      <dc:date>2013-08-31T13:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: datetime.xml  problem with a word "hour"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52375#M10080</link>
      <description>&lt;P&gt;Thanks Tgow, but I tried it in both.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2013 23:28:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52375#M10080</guid>
      <dc:creator>davecroto</dc:creator>
      <dc:date>2013-08-31T23:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: datetime.xml  problem with a word "hour"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52376#M10081</link>
      <description>&lt;P&gt;I don't think we need datetime.xml for this.  I think the "Hour" string needs to be specified just as you are. &lt;/P&gt;

&lt;P&gt;I'd open a support case.  As you can see, the H M gets recognized, while just the H alone does not.&lt;/P&gt;

&lt;P&gt;Interestingly, this:&lt;/P&gt;

&lt;H1&gt;your settings&lt;/H1&gt;

&lt;P&gt;MAX_TIMESTAMP_LOOKAHEAD=50&lt;BR /&gt;
NO_BINARY_CHECK=1&lt;BR /&gt;
SHOULD_LINEMERGE=false&lt;BR /&gt;
TIME_FORMAT= %B %d, %Y, Hour %H %M&lt;/P&gt;

&lt;P&gt;Does get recognized, but without the %M, the %H does not get recognized:&lt;/P&gt;

&lt;P&gt;With %M:&lt;/P&gt;

&lt;P&gt;Timestamp &lt;BR /&gt;
Event&lt;/P&gt;

&lt;P&gt;1 8/13/13 12:30:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 0 300:A general ]&lt;/P&gt;

&lt;P&gt;2 8/13/13 12:30:00.000 AM  August 13, 2013, Hour 0 300:A general ]&lt;/P&gt;

&lt;P&gt;3 8/13/13 12:30:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 0 300:A general ]&lt;/P&gt;

&lt;P&gt;4 8/13/13 12:30:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 0 300:A general ]&lt;/P&gt;

&lt;P&gt;5 8/13/13 12:30:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 0 300:A general ]&lt;/P&gt;

&lt;P&gt;6 8/13/13 1:30:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 1 300:A general ]&lt;/P&gt;

&lt;P&gt;7 8/13/13 1:30:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 1 300:A general ]&lt;/P&gt;

&lt;P&gt;8 8/13/13 1:30:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 1 300:A general ]&lt;/P&gt;

&lt;P&gt;9 8/13/13 1:30:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 1 300:A general ]&lt;/P&gt;

&lt;P&gt;10 8/13/13 1:30:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 1 300:A general ]&lt;/P&gt;

&lt;P&gt;11 8/13/13 2:30:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 2 300:A general ]&lt;/P&gt;

&lt;P&gt;Without %M:&lt;/P&gt;

&lt;P&gt;12 8/13/13 12:00:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 2 300:A general ]&lt;/P&gt;

&lt;P&gt;13 8/13/13 12:00:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 2 300:A general ]&lt;/P&gt;

&lt;P&gt;14 8/13/13 12:00:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 2 300:A general ]&lt;/P&gt;

&lt;P&gt;18 8/13/13 12:00:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 9 300:A general ]&lt;/P&gt;

&lt;P&gt;19 8/13/13 12:00:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 9 300:A general ]&lt;/P&gt;

&lt;P&gt;20 8/13/13 12:00:00.000 AM&lt;BR /&gt;
August 13, 2013, Hour 9 300:A general ]&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:41:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52376#M10081</guid>
      <dc:creator>Jon_Webster</dc:creator>
      <dc:date>2020-09-28T14:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: datetime.xml  problem with a word "hour"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52377#M10082</link>
      <description>&lt;P&gt;Sorry Jon,  This did not work &lt;/P&gt;

&lt;P&gt;The sample log does not always have a %M for example:&lt;/P&gt;

&lt;P&gt;August 13, 2013, Hour 1 foobar:A general &lt;/P&gt;

&lt;P&gt;I will be opening a case.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2013 15:03:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/datetime-xml-problem-with-a-word-quot-hour-quot/m-p/52377#M10082</guid>
      <dc:creator>davecroto</dc:creator>
      <dc:date>2013-09-04T15:03:01Z</dc:date>
    </item>
  </channel>
</rss>

