<?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: When creating data type, Splunk fails to find the correct timestamp to use. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139599#M38413</link>
    <description>&lt;P&gt;Also, check out: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.3/Admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.3/Admin/Propsconf&lt;/A&gt; for the section entitled: Structured Data Header Extraction and configuration.  There are many new options for handling csv data where you can throw out the header, manage the column names, etc.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Apr 2014 14:33:43 GMT</pubDate>
    <dc:creator>dmaislin_splunk</dc:creator>
    <dc:date>2014-04-23T14:33:43Z</dc:date>
    <item>
      <title>When creating data type, Splunk fails to find the correct timestamp to use.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139592#M38406</link>
      <description>&lt;P&gt;I'm trying to make a datatype for a specific kind of CSV data seen by Splunk.  Here's an example of the individual data that Splunk sees, stored as CSV for importing:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# address,alternativeid,alternativeid_restriction,asn,asn_desc,assessment,cc,confidence,description,detecttime,guid,id,portlist,prefix,protocol,purpose,rdata,relatedid,relatedid_restriction,reporttime,restriction,rir,severity
1.2.3.4,some-url-here,public,1234,Description of 1234,scanner,CN,85,ssh,2014-04-23T04:27:21Z,everyone,1acb6224-dde9-4465-a34c-32283a130c00,22,1.2.3.0/18,6,mitigation,,,,2014-04-23T02:31:15Z,need-to-know,APNIC,medium
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are two timestamps, here.  When using this regex, it finds the second timestamp:  &lt;CODE&gt;\d\d\d\d-\d\d-\d\d[A-Z]\d\d:\d\d:\d\dZ&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;What I need it to do is to read the first timestamp, which is the detection time for that specific data rather than the reported time for it.  Can anyone help me figure out how to make Splunk detect the first timestamp, and only that first timestamp?  Note that where it says "ssh" it will not always be "ssh" so you can't use that as part of the detection.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 03:23:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139592#M38406</guid>
      <dc:creator>teward001</dc:creator>
      <dc:date>2014-04-23T03:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: When creating data type, Splunk fails to find the correct timestamp to use.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139593#M38407</link>
      <description>&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX = ^(.*?,){9}
TIME_FORMAT = %Y-%m-%dT%H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 20
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Apr 2014 14:01:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139593#M38407</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2014-04-23T14:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: When creating data type, Splunk fails to find the correct timestamp to use.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139594#M38408</link>
      <description>&lt;P&gt;There's an anomaly in some of the data, and I've added that to the question for additional help if you can give it.  Otherwise, this works perfectly.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 14:22:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139594#M38408</guid>
      <dc:creator>teward001</dc:creator>
      <dc:date>2014-04-23T14:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: When creating data type, Splunk fails to find the correct timestamp to use.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139595#M38409</link>
      <description>&lt;P&gt;The regex searches past the 9th comma and does not care about the word SSH or anything specific.  Can you update the sample log with a few lines where the answer does not work for you?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 14:25:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139595#M38409</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2014-04-23T14:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: When creating data type, Splunk fails to find the correct timestamp to use.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139596#M38410</link>
      <description>&lt;P&gt;I could, if the system would accept the bloody captcha entry... &amp;gt;.&amp;lt;  &lt;CODE&gt;91.121.201.180,not-a-url//blah.foo.bar/lists/date_all.txt,public,,,scanner,,85,ssh,2014-04-22T11:46:41Z,everyone,44e05139-a0d2-492a-b9bf-674daf81194e,22,,6,mitigation,,,,2014-04-23T02:31:30Z,need-to-know,,medium&lt;/CODE&gt; is an example of something that's not caught.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 14:25:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139596#M38410</guid>
      <dc:creator>teward001</dc:creator>
      <dc:date>2014-04-23T14:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: When creating data type, Splunk fails to find the correct timestamp to use.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139597#M38411</link>
      <description>&lt;P&gt;That doesn't get caught because the regex requires a char between the commas. Replace the plus with an asterisk.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 14:28:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139597#M38411</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-23T14:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: When creating data type, Splunk fails to find the correct timestamp to use.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139598#M38412</link>
      <description>&lt;P&gt;Updated the regex above to match the requirement.  I didn't know that you had examples where nothing would be between the commas.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 14:30:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139598#M38412</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2014-04-23T14:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: When creating data type, Splunk fails to find the correct timestamp to use.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139599#M38413</link>
      <description>&lt;P&gt;Also, check out: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.3/Admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.3/Admin/Propsconf&lt;/A&gt; for the section entitled: Structured Data Header Extraction and configuration.  There are many new options for handling csv data where you can throw out the header, manage the column names, etc.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 14:33:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139599#M38413</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2014-04-23T14:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: When creating data type, Splunk fails to find the correct timestamp to use.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139600#M38414</link>
      <description>&lt;P&gt;Works perfectly, thanks again!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 14:39:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-creating-data-type-Splunk-fails-to-find-the-correct/m-p/139600#M38414</guid>
      <dc:creator>teward001</dc:creator>
      <dc:date>2014-04-23T14:39:45Z</dc:date>
    </item>
  </channel>
</rss>

