<?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: How to parse and index a litmonth in other language? (ex: ago (agosto) is August in Spanish) in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261192#M50106</link>
    <description>&lt;P&gt;Just to clarify, it catches the correct date in the preview, but not when you actually index the data?  &lt;/P&gt;</description>
    <pubDate>Fri, 05 Feb 2016 17:19:15 GMT</pubDate>
    <dc:creator>Jeremiah</dc:creator>
    <dc:date>2016-02-05T17:19:15Z</dc:date>
    <item>
      <title>How to parse and index a litmonth in other language? (ex: ago (agosto) is August in Spanish)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261190#M50104</link>
      <description>&lt;P&gt;The date I'm trying to index is in a field inside of each row within a log, and looks like this:&lt;/P&gt;

&lt;P&gt;Time Field&lt;BR /&gt;
&lt;CODE&gt;ago 31,2015 02:01:18 PM&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;"ago" is for agosto (August in English). In other words "ago" is the litmonth for august in Spanish language.&lt;/P&gt;

&lt;P&gt;Every time I'm trying to index a litmonth that is different from English language, it doesn't catch them.&lt;/P&gt;

&lt;P&gt;I tried to configure the datetime.xml like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;define name="_litmonth2"  extract="litmonth"&amp;gt;
     &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?&amp;lt;![\d\w])(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)[a-z,\.;]*]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;define name="_otherdate" extract="litmonth, ignored_sep, day, zone, ignored_sep2, year"&amp;gt;
     &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?&amp;lt;!\w|\d[:\.\-])]]&amp;gt;&amp;lt;/text&amp;gt;
     &amp;lt;use name="_litmonth2"/&amp;gt; 
         &amp;lt;text&amp;gt;&amp;lt;![CDATA[([/\- ]) {0,2}]]&amp;gt;&amp;lt;/text&amp;gt;
         &amp;lt;use name="_day"/&amp;gt;
         &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?!:) {0,2}(?:\d\d:\d\d:\d\d(?:[\.\,]\d+)? {0,2}]]&amp;gt;&amp;lt;/text&amp;gt;
     &amp;lt;use name="_zone"/&amp;gt;
         &amp;lt;text&amp;gt;&amp;lt;![CDATA[)?((?:\2|,) {0,2}]]&amp;gt;&amp;lt;/text&amp;gt;
         &amp;lt;use name="_year"/&amp;gt; 
         &amp;lt;text&amp;gt;&amp;lt;![CDATA[)?(?!/|\w|\.\d)]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;timePatterns&amp;gt;
      &amp;lt;use name="_time"/&amp;gt;
      &amp;lt;use name="_hmtime"/&amp;gt;
      &amp;lt;use name="_hmtime"/&amp;gt;
      &amp;lt;use name="_dottime"/&amp;gt;
      &amp;lt;use name="_combdatetime"/&amp;gt;
      &amp;lt;use name="_utcepoch"/&amp;gt;
      &amp;lt;use name="_combdatetime2"/&amp;gt;
&amp;lt;/timePatterns&amp;gt;
&amp;lt;datePatterns&amp;gt;
      &amp;lt;use name="_otherdate"/&amp;gt;
&amp;lt;/datePatterns&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This actually catch the litmonth ago in the indexing time like the month number 8:&lt;/P&gt;

&lt;P&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/716i060C004544323E79/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;But when is indexed, then it shows this:&lt;/P&gt;

&lt;P&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/717i67E2C20D87D78DC3/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;As you can see, it not the same date than before.&lt;/P&gt;

&lt;P&gt;¿Any clues?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 21:42:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261190#M50104</guid>
      <dc:creator>MacaVergara</dc:creator>
      <dc:date>2015-10-07T21:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse and index a litmonth in other language? (ex: ago (agosto) is August in Spanish)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261191#M50105</link>
      <description>&lt;P&gt;Hi MacaVergara&lt;/P&gt;

&lt;P&gt;Have you found a solution for this.&lt;BR /&gt;
I'm stuck on the same problem. I replicated your solution for german months&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;datetime&amp;gt;

&amp;lt;define name="_year" extract="year"&amp;gt;
    &amp;lt;text&amp;gt;&amp;lt;![CDATA[(20\d\d|19\d\d|[901]\d(?!\d))]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;define name="_day"  extract="day"&amp;gt;
    &amp;lt;text&amp;gt;&amp;lt;![CDATA[(0?[1-9]|[12]\d|3[01])]]&amp;gt;&amp;lt;/text&amp;gt; 
&amp;lt;/define&amp;gt;


 &amp;lt;define name="_litmonth2"  extract="litmonth"&amp;gt;
      &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?&amp;lt;![\d\w])(Januar|Februar|März|April|Mai|Juni|Juli|August|September|Oktober|November|Dezember)[a-z,\.;]*]]&amp;gt;&amp;lt;/text&amp;gt;
 &amp;lt;/define&amp;gt;


&amp;lt;define name="_irequestdate"  extract="day, litmonth, year"&amp;gt;
     &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?&amp;lt;![\d\w])]]&amp;gt;&amp;lt;/text&amp;gt;
     &amp;lt;use name="_day"/&amp;gt;
     &amp;lt;text&amp;gt;&amp;lt;![CDATA[\. ]]&amp;gt;&amp;lt;/text&amp;gt;
     &amp;lt;use name="_litmonth2"/&amp;gt;
     &amp;lt;text&amp;gt;&amp;lt;![CDATA[ ]]&amp;gt;&amp;lt;/text&amp;gt;
         &amp;lt;use name="_year"/&amp;gt;     
&amp;lt;/define&amp;gt;


&amp;lt;datePatterns&amp;gt;
      &amp;lt;use name="_irequestdate"/&amp;gt;
&amp;lt;/datePatterns&amp;gt;

&amp;lt;/datetime&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I don't even get as far as to see the stamp beeing recognized correctly.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 14:53:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261191#M50105</guid>
      <dc:creator>LukeMcfly3</dc:creator>
      <dc:date>2016-02-05T14:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse and index a litmonth in other language? (ex: ago (agosto) is August in Spanish)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261192#M50106</link>
      <description>&lt;P&gt;Just to clarify, it catches the correct date in the preview, but not when you actually index the data?  &lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 17:19:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261192#M50106</guid>
      <dc:creator>Jeremiah</dc:creator>
      <dc:date>2016-02-05T17:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse and index a litmonth in other language? (ex: ago (agosto) is August in Spanish)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261193#M50107</link>
      <description>&lt;P&gt;Unfortunately It doesn't even recognize the correct date format in the preview.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 08:59:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261193#M50107</guid>
      <dc:creator>LukeMcfly3</dc:creator>
      <dc:date>2016-02-09T08:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse and index a litmonth in other language? (ex: ago (agosto) is August in Spanish)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261194#M50108</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Maybe a easy way to correct this problem is set 12 sedcmd with all possible months:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-AGOSTO = s/^ago/8/
SEDCMD-SEPTIEMBRE = s/^sep/9/
.....
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Feb 2016 10:05:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261194#M50108</guid>
      <dc:creator>jmallorquin</dc:creator>
      <dc:date>2016-02-09T10:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse and index a litmonth in other language? (ex: ago (agosto) is August in Spanish)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261195#M50109</link>
      <description>&lt;P&gt;Unfortunately Timestamp Extraction takes place before SED&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 13:26:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261195#M50109</guid>
      <dc:creator>LukeMcfly3</dc:creator>
      <dc:date>2016-02-09T13:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse and index a litmonth in other language? (ex: ago (agosto) is August in Spanish)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261196#M50110</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;I answer without testing and now i can say that you are right.&lt;/P&gt;

&lt;P&gt;Have you try a HF to do this change?&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 13:57:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261196#M50110</guid>
      <dc:creator>jmallorquin</dc:creator>
      <dc:date>2016-02-09T13:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse and index a litmonth in other language? (ex: ago (agosto) is August in Spanish)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261197#M50111</link>
      <description>&lt;P&gt;You could try extracting the correct month in a new field (during index time) and then map that field onto _time (during search time).&lt;/P&gt;

&lt;P&gt;So in props, you would have:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[testsourcetype]
TRANSFORMS-correctMonths = fixJanuar, fixFebruar, ...
EVAL-_time = strptime(correct_date,"%d.%m.%Y")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And in transforms.conf you would have:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[fixJanuar]
REGEX = (\d+). Januar (\d+)
FORMAT = correct_date::$1.01.$2
WRITE_META = true

[fixFebruar]
REGEX = (\d+). Februar (\d+)
FORMAT = correct_date::$1.02.$2
WRITE_META = true

...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works fine for German timestamps in a format like: 03. Januar 2015&lt;/P&gt;

&lt;P&gt;For Spanish, it needs to be adopted slightly (also to take time into consideration).&lt;/P&gt;

&lt;P&gt;Best, Benjamin&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 15:47:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261197#M50111</guid>
      <dc:creator>benjamin1337</dc:creator>
      <dc:date>2016-02-09T15:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse and index a litmonth in other language? (ex: ago (agosto) is August in Spanish)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261198#M50112</link>
      <description>&lt;P&gt;Thank you very much Benjamin.  This does in fact work. The timestamp won't be recognized in the preview but as soon as it ist indexed the correct time stamp is shown.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 22:09:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/261198#M50112</guid>
      <dc:creator>LukeMcfly3</dc:creator>
      <dc:date>2016-02-10T22:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse and index a litmonth in other language? (ex: ago (agosto) is August in Spanish)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/522459#M88227</link>
      <description>&lt;P&gt;Just to quickly leave a note here for anyone googling this: using&amp;nbsp;&lt;FONT face="courier new,courier"&gt;INGEST_EVAL&lt;/FONT&gt; in transforms.conf and targeting _time with &lt;FONT face="courier new,courier"&gt;:=&lt;/FONT&gt; to overwrite it, this makes it even better than &lt;FONT face="courier new,courier"&gt;EVAL-searchtime_things&lt;/FONT&gt; because the event will be saved with a correct timestamp, meaning you'll find your events where you expect.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 10:57:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-and-index-a-litmonth-in-other-language-ex-ago/m-p/522459#M88227</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2020-10-01T10:57:38Z</dc:date>
    </item>
  </channel>
</rss>

