<?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 pull latest scan data with full EST date/time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542379#M153647</link>
    <description>&lt;P&gt;That works!&amp;nbsp; I just changed max to min to retrieve most recent scan data.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputcsv my.csv
| eval ts=strptime(SCAN_DATE, "%b %d, %Y %H:%M:%S %Z")
| eventstats min(ts) as maxts by IP
| where ts=maxts
| fields - ts maxts&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Mar 2021 15:54:34 GMT</pubDate>
    <dc:creator>UMDTERPS</dc:creator>
    <dc:date>2021-03-04T15:54:34Z</dc:date>
    <item>
      <title>How to pull latest scan data with full EST date/time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542060#M153536</link>
      <description>&lt;P&gt;Currently we are having issues with our scan data comming in to out indexer, so we have to use CSV's for scan data &lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt;. The data from CSV's we are uploading into Splunk look like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Scan Date                       Vuln       Blah
Feb 11, 2021 11:30:29 EST        4          15
Feb 18, 2021 11:30:29 EST        10         15    &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;I want to pull only the newest scan data, in this case " Feb 18, 2021 11:30:29 EST"?&amp;nbsp; It doesnt appear "strp time" can run on this date format because of the EST at the end.&amp;nbsp; I know "&lt;SPAN&gt;substr" exists, but it appears it only works on field names, not field values.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 01:30:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542060#M153536</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2021-03-03T01:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull latest scan data with full EST date/time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542163#M153570</link>
      <description>&lt;P&gt;The strptime function does indeed recognize the EST time zone.&amp;nbsp; Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval ts=strptime('Scan Date', "%b %d, %Y %H:%M:%S %Z")&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 Mar 2021 13:31:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542163#M153570</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-03T13:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull latest scan data with full EST date/time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542194#M153582</link>
      <description>&lt;P&gt;How do I pull all data from the most recent date? I only want to see field values from the most recent date,&amp;nbsp;Feb 18, 2021 11:30:29 EST&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 17:00:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542194#M153582</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2021-03-03T17:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull latest scan data with full EST date/time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542240#M153593</link>
      <description>&lt;P&gt;To get the most recent date from the CSV, use inputcsv followed by tail.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputcsv my.csv
| tail 1&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 Mar 2021 19:04:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542240#M153593</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-03T19:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull latest scan data with full EST date/time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542252#M153598</link>
      <description>&lt;P&gt;My apologies, I should have been more specific and added more data to the table to better understand the challenge I'm having:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IP            SCAN_DATE                    Data
192.168.1.1   FEB 16, 2021 11:30:29 EST     1
192.168.1.1   FEB 16, 2021 11:30:29 EST     2
192.168.1.1   FEB 13, 2021 11:30:29 EST     5 
192.168.1.2   FEB 11, 2021 11:30:29 EST     3
192.168.1.2   FEB 14, 2021 11:30:29 EST     4
192.168.1.2   FEB 14, 2021 11:30:29 EST     6
192.168.1.3   FEB 12, 2021 11:30:29 EST     8
192.168.1.3   FEB 18, 2021 11:30:29 EST     20
192.168.1.3   FEB 18, 2021 11:30:29 EST     21&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;If I run:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputcsv my.csv
| tail 1&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;I'll get:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IP                       Scan_Date      Data
192.168.1.1 FEB 16, 2021 11:30:29 EST    1
192.168.1.2 FEB 14, 2021 11:30:29 EST    4
192.168.1.3 FEB 18, 2021 11:30:29 EST    20&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Tail only pulls the first field value for the latest scan_date it sees for each IP. I need all field values (all data) for each IP for the newest date.&amp;nbsp; The search would return something like this (it would ignore the older SCAN_DATE for each IP):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IP          SCAN_DATE             Data
192.168.1.1 FEB 16, 2021 11:30:29 EST 1
192.168.1.1 FEB 16, 2021 11:30:29 EST 2
192.168.1.2 FEB 14, 2021 11:30:29 EST 4
192.168.1.2 FEB 14, 2021 11:30:29 EST 6
192.168.1.3 FEB 18, 2021 11:30:29 EST 20
192.168.1.3 FEB 18, 2021 11:30:29 EST 21&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 20:19:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542252#M153598</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2021-03-03T20:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull latest scan data with full EST date/time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542363#M153644</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;tail&lt;/FONT&gt; command does not examine fields - it should return the 1 line from the end of the CSV, but that's a moot point now that you've clarified the requirements.&lt;/P&gt;&lt;P&gt;To get the latest date for each IP address we need to convert the timestamps into epoch form so we can find the most recent one.&amp;nbsp; Here's how we do that.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputcsv my.csv
| eval ts=strptime(SCAN_DATE, "%b %d, %Y %H:%M:%S %Z")
| eventstats max(ts) as maxts by IP
| where ts=maxts
| fields - ts maxts&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 04 Mar 2021 14:39:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542363#M153644</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-04T14:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull latest scan data with full EST date/time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542379#M153647</link>
      <description>&lt;P&gt;That works!&amp;nbsp; I just changed max to min to retrieve most recent scan data.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputcsv my.csv
| eval ts=strptime(SCAN_DATE, "%b %d, %Y %H:%M:%S %Z")
| eventstats min(ts) as maxts by IP
| where ts=maxts
| fields - ts maxts&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 15:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542379#M153647</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2021-03-04T15:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull latest scan data with full EST date/time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542390#M153649</link>
      <description>&lt;P&gt;It should be &lt;FONT face="courier new,courier"&gt;max()&lt;/FONT&gt; since the most recent timestamp will convert into the biggest number, but whatever works for you.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 17:43:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-latest-scan-data-with-full-EST-date-time/m-p/542390#M153649</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-04T17:43:54Z</dc:date>
    </item>
  </channel>
</rss>

