<?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: Custom month names? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12890#M1070</link>
    <description>&lt;P&gt;Timestamps have already been extracted before the events exist.  They're part of how we find event boundaries.  Thus all event transformations are too late.&lt;/P&gt;</description>
    <pubDate>Wed, 05 May 2010 21:26:59 GMT</pubDate>
    <dc:creator>jrodman</dc:creator>
    <dc:date>2010-05-05T21:26:59Z</dc:date>
    <item>
      <title>Custom month names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12885#M1065</link>
      <description>&lt;P&gt;Hi, I'm having problems timestamp extraction of custom month names (written in my language). Here is a sample log entry:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[26/stu/2010:14:37:40 +0200]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;First i tried using TIME_PREFIX and &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%d/%b/%Y:%H:%M%S
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but splnuk was unable to understand it and generates wrong timestamp. Next i tried modifying datetime.xml and replacing english month notation with this regex (sij|vel|ozu|tra|svi|lip|srp|kol|ruj|lis|stu|pro) and setting it as argument to DATETIME_CONFIG in props.conf. This also produces wrong timestamp.&lt;/P&gt;

&lt;P&gt;What is correct procedure to map english notation (eg. jan feb mar...) to my language (sij, vel, ozu...)? I suppose i need to add transformation and replace my localized names to english ones? How can i do such mapping?&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2010 04:58:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12885#M1065</guid>
      <dc:creator>gljiva</dc:creator>
      <dc:date>2010-05-05T04:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Custom month names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12886#M1066</link>
      <description>&lt;P&gt;If Splunk is running in the that locale, then I would expect this %b conversion to work.  What does the command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# date +'%b'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;show for you, in the environment in which splunk is used?&lt;/P&gt;

&lt;P&gt;UPDATE: We don't have locale handling in our date parsing at all, currently.  I had somehow imagined that we made use of the system library for the specific string decoding, but apparently it is a custom implementation for cross-platform consistency, existence at all on windows, and performance goals.&lt;/P&gt;

&lt;P&gt;Essentially this becomes an enhancement request (although a fairly important one) for handling localized european dates.  In Asia this hasn't come up (yet) because mostly numerics are used for  months, rather than names.&lt;/P&gt;

&lt;P&gt;The only short-term workarounds I can recommend are to pre-process the file, or to alter the date format in which it is emitted.  Obviously neither is ideal but it's what's possible today.&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2010 12:55:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12886#M1066</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-05-05T12:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Custom month names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12887#M1067</link>
      <description>&lt;P&gt;Hi, Splunk is running in a different locale than one used in logs. &lt;/P&gt;

&lt;P&gt;date +'%b' returns&lt;BR /&gt;
May&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2010 15:02:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12887#M1067</guid>
      <dc:creator>gljiva</dc:creator>
      <dc:date>2010-05-05T15:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom month names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12888#M1068</link>
      <description>&lt;P&gt;Hi, i tried using sed to rewrite month names, it is overwritten fine:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[23/Nov/2010:14:37:40 +0200]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But timestamp is wrong, it seems that splunk first resolves timestamp and then does sed replace.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-sij = s/sij/Jan/
SEDCMD-vel = s/vel/Feb/
SEDCMD-ozu = s/ozu/Mar/
SEDCMD-tra = s/tra/Apr/
SEDCMD-svi = s/svi/May/
SEDCMD-lip = s/lip/Jun/
SEDCMD-srp = s/srp/Jul/
SEDCMD-kol = s/kol/Aug/
SEDCMD-ruj = s/ruj/Sep/
SEDCMD-lis = s/lis/Oct/
SEDCMD-stu = s/stu/Nov/
SEDCMD-pro = s/pro/Dec/
TIME_PREFIX = \d*.\d*.\d*.\d* - \w* \[
TIME_FORMAT = %d/%b/%Y:%H:%M%S
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 May 2010 15:23:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12888#M1068</guid>
      <dc:creator>gljiva</dc:creator>
      <dc:date>2010-05-05T15:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Custom month names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12889#M1069</link>
      <description>&lt;P&gt;What's the incoming datastream like?  What hosts are running in a locale where the timestamps will look like this?  How does it arrive?  The goal here is to have a splunk running in the desired locale, handling that data.&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2010 21:24:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12889#M1069</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-05-05T21:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Custom month names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12890#M1070</link>
      <description>&lt;P&gt;Timestamps have already been extracted before the events exist.  They're part of how we find event boundaries.  Thus all event transformations are too late.&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2010 21:26:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12890#M1070</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-05-05T21:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Custom month names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12891#M1071</link>
      <description>&lt;P&gt;So how do i rewrite timestamps?&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2010 00:14:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12891#M1071</guid>
      <dc:creator>gljiva</dc:creator>
      <dc:date>2010-05-06T00:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Custom month names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12892#M1072</link>
      <description>&lt;P&gt;Incoming datastream is similar to sample provided in first post, every event contains timestamp inside []. I tested locale settings on splunk server indexing data and indeed locale is set to right one (locale matches log locale), but splunk still doesn't understand timestamps. How can i manually rewrite timestamp or tell it real mapping between names?&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2010 00:17:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12892#M1072</guid>
      <dc:creator>gljiva</dc:creator>
      <dc:date>2010-05-06T00:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Custom month names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12893#M1073</link>
      <description>&lt;P&gt;There's a defect or a missing step.  Please work with splunk support to resolve.&lt;/P&gt;</description>
      <pubDate>Sat, 08 May 2010 00:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/12893#M1073</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-05-08T00:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Custom month names?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/688332#M114635</link>
      <description>&lt;P&gt;A very old post but still relevant if the log timestamp format cannot be change.&lt;/P&gt;&lt;P&gt;If exact timestamp is not needed I would set this to current or none for the specific sourcetype in props.conf. It is a very quick fix.&lt;/P&gt;&lt;PRE&gt;DATETIME_CONFIG = [CURRENT | NONE]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Alternative just extract the time and not the date. Works fine as long as the events are indexed the same day as they are written.&lt;/P&gt;&lt;PRE&gt;TIME_FORMAT = %H:%M:%S&lt;/PRE&gt;&lt;P&gt;As last alternative datetime.xml is possible but maybe not so easy. In this case it might be enough to modify the "litmonth" attributes. Just remember to copy the file and rename it to something else and use that modified file for this specific sourcetype only. Modifying datetime.xml would impact all transactions on so do not do that.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 13:15:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-month-names/m-p/688332#M114635</guid>
      <dc:creator>pellegrini</dc:creator>
      <dc:date>2024-05-22T13:15:13Z</dc:date>
    </item>
  </channel>
</rss>

