<?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: Identify Two Digit Year Timestamp Events Query (2020 Timestamp Issue) in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Identify-Two-Digit-Year-Timestamp-Events-Query-2020-Timestamp/m-p/501318#M85417</link>
    <description>&lt;P&gt;You can use this search to find potentially problematic events.  DISClAIMER: This is NOT a guarantee because we have no way to tell with SPL whether Indexers are using &lt;CODE&gt;datetime.xml&lt;/CODE&gt; or proper &lt;CODE&gt;Magic 6&lt;/CODE&gt; settings.  It will show you events that &lt;EM&gt;IF&lt;/EM&gt; the indexers are using &lt;CODE&gt;datetime.xml&lt;/CODE&gt;, will be broken without the fix.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="*" AND sourcetype="*" AND timestartpos="*" earliest=-7d latest=now
| dedup punct sourcetype index
| eval timestr=substr(_raw, timestartpos+1, timeendpos-timestartpos)
| regex timestr="(((?:^|\D)\d{1,2}[-\/]\d{1,2}[-\/]19[^\d])|((?:^|\D)19[-\/]\d{1,2}[-\/]\d{1,2}[^\d])|((?:^|\D)\d{1,2}\s[-\/]\s\d{1,2}\s[-\/]\s19[^\d])|((?:^|\D)19\s[-\/]\s\d{1,2}\s[-\/]\s\d{1,2}[^\d])|((?:^|\D)([a-zA-Z]{3}[- \/]+\d{1,2}[- \/]+19[^:\d]))|((?:^|\D)19[- \/][a-zA-Z]{3}[- \/]\d{1,2}[^:\d])|((?:^|\D)\d{1,2}[- \/]+[a-zA-Z]{3}[- \/]+19[^:\d]))"
| table punct sourcetype index timestr time*pos _time _raw time*
| stats list(*) AS * BY index sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If this search returns nothing, then you have nothing to fix.  Do note that this search will return the same results BEFORE and AFTER you deploy the fix.  It only shows your potential risk, not your actual.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2019 18:29:21 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-12-11T18:29:21Z</dc:date>
    <item>
      <title>Identify Two Digit Year Timestamp Events Query (2020 Timestamp Issue)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Identify-Two-Digit-Year-Timestamp-Events-Query-2020-Timestamp/m-p/501315#M85414</link>
      <description>&lt;P&gt;We are trying to identify how much of our data is impacted by the latest timestamp bug. I was wondering if there was a query that used regex to search _raw for events that have 2 digit years. This will greatly help us analyze the risk of doing a last minute production upgrade...&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 20:02:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Identify-Two-Digit-Year-Timestamp-Events-Query-2020-Timestamp/m-p/501315#M85414</guid>
      <dc:creator>jordanking1992</dc:creator>
      <dc:date>2019-12-04T20:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Two Digit Year Timestamp Events Query (2020 Timestamp Issue)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Identify-Two-Digit-Year-Timestamp-Events-Query-2020-Timestamp/m-p/501316#M85415</link>
      <description>&lt;P&gt;Hi jordanking1992,&lt;/P&gt;

&lt;P&gt;I posted that in the slack channel &lt;CODE&gt;#splunky2k&lt;/CODE&gt; channel:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* TERM(19) 
| regex _raw="[\\\/\|-](19)" 
| rex "(?&amp;lt;myField&amp;gt;[^\s]+19)" 
| search myField!="*2019*" 
| stats count by index sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It later got this little enhancement:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* TERM(19)
| eval sample=substr(_raw,0,128), search="index=".index." sourcetype=".sourcetype." TERM(19)"
| regex sample="(((?:^|\D)\d{1,2}[-\/]\d{1,2}[-\/]19[^\d])|((?:^|\D)19[-\/]\d{1,2}[-\/]\d{1,2}[^\d])|((?:^|\D)\d{1,2}\s[-\/]\s\d{1,2}\s[-\/]\s19[^\d])|((?:^|\D)19\s[-\/]\s\d{1,2}\s[-\/]\s\d{1,2}[^\d])|((?:^|\D)([a-zA-Z]{3}[- \/]+\d{1,2}[- \/]+19[^:\d]))|((?:^|\D)19[- \/][a-zA-Z]{3}[- \/]\d{1,2}[^:\d])|((?:^|\D)\d{1,2}[- \/]+[a-zA-Z]{3}[- \/]+19[^:\d]))"
| stats count last(sample) as sample by search
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please be aware that this is a very hungry, resource intensive search!&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;UPDATE&lt;/STRONG&gt; modifications to the regex and the &lt;CODE&gt;substr()&lt;/CODE&gt; uses the first 128 characters of the event. &lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 21:12:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Identify-Two-Digit-Year-Timestamp-Events-Query-2020-Timestamp/m-p/501316#M85415</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-12-04T21:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Two Digit Year Timestamp Events Query (2020 Timestamp Issue)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Identify-Two-Digit-Year-Timestamp-Events-Query-2020-Timestamp/m-p/501317#M85416</link>
      <description>&lt;P&gt;Thank you so much. No more headaches!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 21:55:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Identify-Two-Digit-Year-Timestamp-Events-Query-2020-Timestamp/m-p/501317#M85416</guid>
      <dc:creator>jordanking1992</dc:creator>
      <dc:date>2019-12-04T21:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Two Digit Year Timestamp Events Query (2020 Timestamp Issue)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Identify-Two-Digit-Year-Timestamp-Events-Query-2020-Timestamp/m-p/501318#M85417</link>
      <description>&lt;P&gt;You can use this search to find potentially problematic events.  DISClAIMER: This is NOT a guarantee because we have no way to tell with SPL whether Indexers are using &lt;CODE&gt;datetime.xml&lt;/CODE&gt; or proper &lt;CODE&gt;Magic 6&lt;/CODE&gt; settings.  It will show you events that &lt;EM&gt;IF&lt;/EM&gt; the indexers are using &lt;CODE&gt;datetime.xml&lt;/CODE&gt;, will be broken without the fix.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="*" AND sourcetype="*" AND timestartpos="*" earliest=-7d latest=now
| dedup punct sourcetype index
| eval timestr=substr(_raw, timestartpos+1, timeendpos-timestartpos)
| regex timestr="(((?:^|\D)\d{1,2}[-\/]\d{1,2}[-\/]19[^\d])|((?:^|\D)19[-\/]\d{1,2}[-\/]\d{1,2}[^\d])|((?:^|\D)\d{1,2}\s[-\/]\s\d{1,2}\s[-\/]\s19[^\d])|((?:^|\D)19\s[-\/]\s\d{1,2}\s[-\/]\s\d{1,2}[^\d])|((?:^|\D)([a-zA-Z]{3}[- \/]+\d{1,2}[- \/]+19[^:\d]))|((?:^|\D)19[- \/][a-zA-Z]{3}[- \/]\d{1,2}[^:\d])|((?:^|\D)\d{1,2}[- \/]+[a-zA-Z]{3}[- \/]+19[^:\d]))"
| table punct sourcetype index timestr time*pos _time _raw time*
| stats list(*) AS * BY index sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If this search returns nothing, then you have nothing to fix.  Do note that this search will return the same results BEFORE and AFTER you deploy the fix.  It only shows your potential risk, not your actual.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 18:29:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Identify-Two-Digit-Year-Timestamp-Events-Query-2020-Timestamp/m-p/501318#M85417</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-12-11T18:29:21Z</dc:date>
    </item>
  </channel>
</rss>

