<?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: TIME_FORMAT UDP Input Fail in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20885#M8444</link>
    <description>&lt;P&gt;only for search time field extractions, which I don't think is what is intended here:&lt;/P&gt;

&lt;P&gt;FORMAT for search-time extractions:&lt;BR /&gt;
    * The format of this field as used during search time extractions is as follows:&lt;BR /&gt;
        * FORMAT = &lt;FIELD-NAME&gt;::&lt;FIELD-VALUE&gt;( &lt;FIELD-NAME&gt;::&lt;FIELD-VALUE&gt;)* &lt;BR /&gt;
            * where:&lt;BR /&gt;
            * field-name  = [&lt;STRING&gt;|$&lt;EXTRACTING-GROUP-NUMBER&gt;]&lt;BR /&gt;
            * field-value = [&lt;STRING&gt;|$&lt;EXTRACTING-GROUP-NUMBER&gt;]&lt;BR /&gt;
    * Search-time extraction examples:&lt;BR /&gt;
        * 1. FORMAT = first::$1 second::$2 third::other-value&lt;BR /&gt;
        * 2. FORMAT = $1::$2&lt;/EXTRACTING-GROUP-NUMBER&gt;&lt;/STRING&gt;&lt;/EXTRACTING-GROUP-NUMBER&gt;&lt;/STRING&gt;&lt;/FIELD-VALUE&gt;&lt;/FIELD-NAME&gt;&lt;/FIELD-VALUE&gt;&lt;/FIELD-NAME&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jul 2012 19:04:33 GMT</pubDate>
    <dc:creator>jbsplunk</dc:creator>
    <dc:date>2012-07-30T19:04:33Z</dc:date>
    <item>
      <title>TIME_FORMAT UDP Input Fail</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20878#M8437</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to use a different timestamp located in the event data. This is a UDP input on a forwarder which I have first created a new sourcetype.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::udp:514]
TRANSFORMS-changesource = new_sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[new_sourcetype]
DEST_KEY = MetaData:Sourcetype
REGEX = mydata
FORMAT = sourcetype::newsourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then on my indexer splunk is automatically appending the date + host to my events coming from UDP, this can be stopped by using "no_appending_timestamp = true" under the input and this actually causes splunk to see the correct date from the raw data.&lt;/P&gt;

&lt;P&gt;I believe you cannot apply timestamp changes to sourcetypes that have been generated in a transform?&lt;/P&gt;

&lt;P&gt;I have tried the following on the indexer but with no luck:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host::192.168.1.1]
MAX_TIMESTAMP_LOOKAHEAD = 30
TIME_FORMAT = %b %d %H:%M:%S.%6N
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Example data coming in via syslog-ng&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jul 30 12:57:02.68787 host1 testdaemon: DEBUG Starting daemon
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;This gets indexed&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jul 30 12:57:02 192.168.1.1 Jul 30 12:57:02.687871 host1 testdaemon: DEBUG Starting daemon
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Help would be appreciated as I have rattled my brain for hours now! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:10:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20878#M8437</guid>
      <dc:creator>matthewparry</dc:creator>
      <dc:date>2020-09-28T12:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT UDP Input Fail</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20879#M8438</link>
      <description>&lt;P&gt;You're trying to use the syslog-ng stamp at the beginning of the line, or the device's native stamp starting after its IP address?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2012 12:31:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20879#M8438</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-07-30T12:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT UDP Input Fail</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20880#M8439</link>
      <description>&lt;P&gt;No. once the sourcetype has been changed then it will have passed the index time parsing.&lt;BR /&gt;
What you want to do is apply the timestamp stripping from the syslog message first and then change the sourcetype, e.g;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::udp:514]
TRANSFORMS-stripts = strip_timestamp
TRANSFORMS-changesource = new_sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could still do it on a per host basis though, there may be another way to wriggle it round but this is the way I've ended up doing it on my implementations&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2012 12:59:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20880#M8439</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2012-07-30T12:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT UDP Input Fail</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20881#M8440</link>
      <description>&lt;P&gt;I am trying to use the time from syslog-ng "Jul 30 12:57:02.687871" as the event time.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2012 13:28:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20881#M8440</guid>
      <dc:creator>matthewparry</dc:creator>
      <dc:date>2012-07-30T13:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT UDP Input Fail</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20882#M8441</link>
      <description>&lt;P&gt;I have a heavy forwarder that receives the UDP syslog data which then forwards this to the indexer.&lt;BR /&gt;
For some reason when trying to create the source type, this needs to be on the forwarder? and the timestamp changes need to be done on the indexer?&lt;/P&gt;

&lt;P&gt;This means it will never execute in the correct order?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2012 13:40:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20882#M8441</guid>
      <dc:creator>matthewparry</dc:creator>
      <dc:date>2012-07-30T13:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT UDP Input Fail</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20883#M8442</link>
      <description>&lt;P&gt;On your heavy forwarder, you've made some mistakes. &lt;/P&gt;

&lt;P&gt;For props.conf, I would add TIME_PREFIX with a regex to match the data that comes before the timestamp you want to extract&lt;/P&gt;

&lt;P&gt;[host::192.168.1.1]&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 30&lt;BR /&gt;
TIME_PREFIX = REGEX&lt;BR /&gt;
TIME_FORMAT = %b %d %H:%M:%S.%6N&lt;/P&gt;

&lt;P&gt;This transform is incorrect: &lt;/P&gt;

&lt;P&gt;FORMAT = sourcetype::newsourcetype &lt;/P&gt;

&lt;P&gt;What you should be doing looks like this:&lt;/P&gt;

&lt;P&gt;[new_sourcetype]&lt;BR /&gt;
DEST_KEY = MetaData:Sourcetype&lt;BR /&gt;
REGEX = mydata&lt;BR /&gt;
FORMAT = newsourcetype&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20883#M8442</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2020-09-28T12:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT UDP Input Fail</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20884#M8443</link>
      <description>&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Transformsconf"&gt;This document&lt;/A&gt; suggests that the "sourcetype::" is in fact needed.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2012 18:44:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20884#M8443</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-07-30T18:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT UDP Input Fail</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20885#M8444</link>
      <description>&lt;P&gt;only for search time field extractions, which I don't think is what is intended here:&lt;/P&gt;

&lt;P&gt;FORMAT for search-time extractions:&lt;BR /&gt;
    * The format of this field as used during search time extractions is as follows:&lt;BR /&gt;
        * FORMAT = &lt;FIELD-NAME&gt;::&lt;FIELD-VALUE&gt;( &lt;FIELD-NAME&gt;::&lt;FIELD-VALUE&gt;)* &lt;BR /&gt;
            * where:&lt;BR /&gt;
            * field-name  = [&lt;STRING&gt;|$&lt;EXTRACTING-GROUP-NUMBER&gt;]&lt;BR /&gt;
            * field-value = [&lt;STRING&gt;|$&lt;EXTRACTING-GROUP-NUMBER&gt;]&lt;BR /&gt;
    * Search-time extraction examples:&lt;BR /&gt;
        * 1. FORMAT = first::$1 second::$2 third::other-value&lt;BR /&gt;
        * 2. FORMAT = $1::$2&lt;/EXTRACTING-GROUP-NUMBER&gt;&lt;/STRING&gt;&lt;/EXTRACTING-GROUP-NUMBER&gt;&lt;/STRING&gt;&lt;/FIELD-VALUE&gt;&lt;/FIELD-NAME&gt;&lt;/FIELD-VALUE&gt;&lt;/FIELD-NAME&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2012 19:04:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20885#M8444</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2012-07-30T19:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT UDP Input Fail</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20886#M8445</link>
      <description>&lt;P&gt;I am actually using:&lt;/P&gt;

&lt;P&gt;[host::192.168.1.1]&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 30&lt;BR /&gt;
TIME_PREFIX = .+(?=\w{3} \d{2} \d{2}:\d{2}:\d{2}.\d{6}) &lt;BR /&gt;
TIME_FORMAT = %b %d %H:%M:%S.%6N&lt;/P&gt;

&lt;P&gt;This has worked. I am unable to get it too work by substituting the [host::192.168.1.1] for a sourcetype but I believe this is due to the fact I am using a transform to generate a new sourcetype and the timestamps need to come before any transforms..&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:10:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/TIME-FORMAT-UDP-Input-Fail/m-p/20886#M8445</guid>
      <dc:creator>matthewparry</dc:creator>
      <dc:date>2020-09-28T12:10:26Z</dc:date>
    </item>
  </channel>
</rss>

