<?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: Get the recent event date from a .csv using inputlookup at the same time append a wildcard into the host. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Get-the-recent-event-date-from-a-csv-using-inputlookup-at-the/m-p/687698#M234547</link>
    <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=unix [|inputlookup hostname_list.csv]
| stats latest(_time) as latest_time, latest(source) as source, latest(_raw) as event by host | convert ctime(latest_time) as latest_time | table host, latest_time, source, event&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 16 May 2024 07:55:14 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-05-16T07:55:14Z</dc:date>
    <item>
      <title>Get the recent event date from a .csv using inputlookup at the same time append a wildcard into the host.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-the-recent-event-date-from-a-csv-using-inputlookup-at-the/m-p/687686#M234543</link>
      <description>&lt;P&gt;Currently, this is my SPL query and it just displays different results&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;this is my&amp;nbsp;hostname_list.csv&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;host&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;hostname_a*&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;hostname_b*&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;hostname_c*&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;| inputlookup hostname_list.csv&lt;BR /&gt;| fields host&lt;BR /&gt;| join type=inner host [search index=unix | stats latest(_time) as latest_time, latest(source) as source, latest(_raw) as event by host | convert ctime(latest_time) as latest_time] | table host, latest_time, source, event&lt;BR /&gt;&lt;BR /&gt;and it displays like this one:&lt;/P&gt;&lt;TABLE border="1" width="63.999685345852946%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;host&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;latest_time&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;source&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;event&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;hostname_a*&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;hostname_b*&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;hostname_c*&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I assume that the wildcard "*" is acting like a literal string.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I'm expecting results like this.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="175.719px" height="24px"&gt;host&lt;/TD&gt;&lt;TD width="175.719px" height="24px"&gt;latest_time&lt;/TD&gt;&lt;TD width="175.719px" height="24px"&gt;source&lt;/TD&gt;&lt;TD width="175.75px" height="24px"&gt;event&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="175.719px" height="24px"&gt;hostname_a12&lt;/TD&gt;&lt;TD width="175.719px" height="24px"&gt;test&lt;/TD&gt;&lt;TD width="175.719px" height="24px"&gt;test&lt;/TD&gt;&lt;TD width="175.75px" height="24px"&gt;test&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="175.719px" height="24px"&gt;hostname_a23&lt;/TD&gt;&lt;TD width="175.719px" height="24px"&gt;test&lt;/TD&gt;&lt;TD width="175.719px" height="24px"&gt;test&lt;/TD&gt;&lt;TD width="175.75px" height="24px"&gt;test&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="175.719px" height="24px"&gt;hostname_c123&lt;/TD&gt;&lt;TD width="175.719px" height="24px"&gt;test&lt;/TD&gt;&lt;TD width="175.719px" height="24px"&gt;test&lt;/TD&gt;&lt;TD width="175.75px" height="24px"&gt;test&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;please help thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 06:56:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-the-recent-event-date-from-a-csv-using-inputlookup-at-the/m-p/687686#M234543</guid>
      <dc:creator>ephraimjoseph</dc:creator>
      <dc:date>2024-05-16T06:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get the recent event date from a .csv using inputlookup at the same time append a wildcard into the host.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-the-recent-event-date-from-a-csv-using-inputlookup-at-the/m-p/687698#M234547</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=unix [|inputlookup hostname_list.csv]
| stats latest(_time) as latest_time, latest(source) as source, latest(_raw) as event by host | convert ctime(latest_time) as latest_time | table host, latest_time, source, event&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 May 2024 07:55:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-the-recent-event-date-from-a-csv-using-inputlookup-at-the/m-p/687698#M234547</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-05-16T07:55:14Z</dc:date>
    </item>
  </channel>
</rss>

