<?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 do I edit my datetime.xml file for my custom date and time to be recognized in Splunk? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269235#M51684</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;Can someone tell me what I'm suppose to edit in my datetime.xml file for my custom date and time to be recognized in Splunk? Here is example of a log:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1405i5365CF256F50BA23/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I have tried:&lt;BR /&gt;
datetime.xml&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;datetime&amp;gt;
&amp;lt;define name="Date" extract="year, month, day"&amp;gt;
&amp;lt;text&amp;gt;\&amp;lt;DATE&amp;gt;(\d{4})(\d{2})(\d{2})&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;define name="Time" extract="hour, minute, second"&amp;gt;
&amp;lt;text&amp;gt;\&amp;lt;TIME&amp;gt;(\d{2})(\d{2})(\d{2})&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;timePatterns&amp;gt;
&amp;lt;use name="Time"/&amp;gt;
&amp;lt;/timePatterns&amp;gt;

&amp;lt;datePatterns&amp;gt;
&amp;lt;use name="Date"/&amp;gt;
&amp;lt;/datePatterns&amp;gt;

&amp;lt;/datetime&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATETIME_CONFIG = /etc/system/local/datetime.xml
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I think I'm missing something here....&lt;/P&gt;

&lt;P&gt;Thanks, cheers&lt;/P&gt;</description>
    <pubDate>Wed, 25 May 2016 07:27:47 GMT</pubDate>
    <dc:creator>gagi76</dc:creator>
    <dc:date>2016-05-25T07:27:47Z</dc:date>
    <item>
      <title>How do I edit my datetime.xml file for my custom date and time to be recognized in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269235#M51684</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;Can someone tell me what I'm suppose to edit in my datetime.xml file for my custom date and time to be recognized in Splunk? Here is example of a log:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1405i5365CF256F50BA23/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I have tried:&lt;BR /&gt;
datetime.xml&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;datetime&amp;gt;
&amp;lt;define name="Date" extract="year, month, day"&amp;gt;
&amp;lt;text&amp;gt;\&amp;lt;DATE&amp;gt;(\d{4})(\d{2})(\d{2})&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;define name="Time" extract="hour, minute, second"&amp;gt;
&amp;lt;text&amp;gt;\&amp;lt;TIME&amp;gt;(\d{2})(\d{2})(\d{2})&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;timePatterns&amp;gt;
&amp;lt;use name="Time"/&amp;gt;
&amp;lt;/timePatterns&amp;gt;

&amp;lt;datePatterns&amp;gt;
&amp;lt;use name="Date"/&amp;gt;
&amp;lt;/datePatterns&amp;gt;

&amp;lt;/datetime&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATETIME_CONFIG = /etc/system/local/datetime.xml
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I think I'm missing something here....&lt;/P&gt;

&lt;P&gt;Thanks, cheers&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 07:27:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269235#M51684</guid>
      <dc:creator>gagi76</dc:creator>
      <dc:date>2016-05-25T07:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my datetime.xml file for my custom date and time to be recognized in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269236#M51685</link>
      <description>&lt;P&gt;I changed it few times, and now looks like this and again splunk does not recognize date and time... any ideas? &lt;/P&gt;

&lt;P&gt;First I did it with this props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATETIME_CONFIG = C:\Program Files\Splunk\etc\system\local\datetime.xml
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Second time with this props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATETIME_CONFIG = C:\Program Files\Splunk\etc\system\local\datetime.xml
TIME_PREFIX = DATE\&amp;gt;
TIME_FORMAT = %Y%m%d&amp;lt;/DATE&amp;gt;&amp;lt;TIME&amp;gt;%H%M%S
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And my datetime.xml looks like this now :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;

&amp;lt;datetime&amp;gt;
&amp;lt;define name="_Date" extract="year, month, day"&amp;gt;
    &amp;lt;text&amp;gt;\DATE&amp;gt;(\d{4})(\d{2})(\d{2})&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;define name="_Time" extract="hour, minute, second"&amp;gt;
    &amp;lt;text&amp;gt;\TIME&amp;gt;(\d{2})(\d{2})(\d{2})&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;timePatterns&amp;gt;
    &amp;lt;use name="_Date"/&amp;gt;
    &amp;lt;use name="_Time"/&amp;gt;
&amp;lt;/timePatterns&amp;gt;

&amp;lt;datePatterns&amp;gt;
    &amp;lt;use name="_Date"/&amp;gt;
    &amp;lt;use name="_Time"/&amp;gt;
&amp;lt;/datePatterns&amp;gt;
&amp;lt;/datetime&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 May 2016 19:00:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269236#M51685</guid>
      <dc:creator>gagi76</dc:creator>
      <dc:date>2016-05-25T19:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my datetime.xml file for my custom date and time to be recognized in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269237#M51686</link>
      <description>&lt;P&gt;Once you switch to &lt;CODE&gt;datetime.xml&lt;/CODE&gt;, the other time configurations do not work.&lt;/P&gt;

&lt;P&gt;DO NOT EDIT &lt;CODE&gt;/etc/system/local/datetime.xml&lt;/CODE&gt;!&lt;/P&gt;

&lt;P&gt;Create a new file inside of your app:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/etc/apps/YourApp/default/datetime.xml
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In any case, you don't need a custom &lt;CODE&gt;datetime.xml&lt;/CODE&gt; and I wouldn't do it that way because it is complicated and unnecessary.&lt;/P&gt;

&lt;P&gt;In props.conf all you should need is this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX = "&amp;lt;LOG&amp;gt;&amp;lt;DATE&amp;gt;"
TIME_FORMAT = %Y%m%d&amp;lt;/DATE&amp;gt;&amp;lt;TIME&amp;gt;%H%M%S
MAX_TIMESTAMP_LOOKAHEAD = 27
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This, of course, presumes that you have event &lt;CODE&gt;line-breaking&lt;/CODE&gt; working correctly.&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 16:42:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269237#M51686</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-26T16:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my datetime.xml file for my custom date and time to be recognized in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269238#M51687</link>
      <description>&lt;P&gt;i succeeded with : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX = DATE&amp;gt;
TIME_FORMAT = %Y%m%d&amp;lt;/DATE&amp;gt;&amp;lt;TIME&amp;gt;%H%M%S
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks for datetime.xml tips.&lt;/P&gt;

&lt;P&gt;cheers&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 06:40:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269238#M51687</guid>
      <dc:creator>gagi76</dc:creator>
      <dc:date>2016-05-27T06:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my datetime.xml file for my custom date and time to be recognized in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269239#M51688</link>
      <description>&lt;P&gt;Hey. &lt;/P&gt;

&lt;P&gt;I have the same issue, but the date and time fields are on separate lines. How would you solve this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...
&amp;lt;Date&amp;gt;20151130&amp;lt;/Date&amp;gt;
&amp;lt;Time&amp;gt;082327&amp;lt;/Time&amp;gt;
&amp;lt;Client&amp;gt;600&amp;lt;/Client&amp;gt;
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;thanks&lt;BR /&gt;
Markus&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 08:50:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269239#M51688</guid>
      <dc:creator>markusspitzli2</dc:creator>
      <dc:date>2016-06-22T08:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my datetime.xml file for my custom date and time to be recognized in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269240#M51689</link>
      <description>&lt;P&gt;I just got the answer by myself:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     TIME_FORMAT = %Y%m%d&amp;lt;/DATE&amp;gt;%n&amp;lt;TIME&amp;gt;%H%M%S
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jun 2016 09:19:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-edit-my-datetime-xml-file-for-my-custom-date-and-time/m-p/269240#M51689</guid>
      <dc:creator>markusspitzli2</dc:creator>
      <dc:date>2016-06-22T09:19:48Z</dc:date>
    </item>
  </channel>
</rss>

