<?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: .csv Lookups in a tstats Heartbeat Query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-input-csv-lookups-in-a-tstats-Heartbeat-query/m-p/646737#M223853</link>
    <description>&lt;P&gt;Have you tried a subsearch?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats latest(_time) as latest where [ | inputlookup indexes.csv | fields index | format ] earliest=-24h by index
| eval recent = if(latest &amp;gt; relative_time(now(),"-1m"),1,0), realLatest = strftime(latest,"%c")
| where recent=0
| fields- recent, latest
| rename realLatest as "Last Event Timestamp"&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 13 Jun 2023 00:18:39 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-06-13T00:18:39Z</dc:date>
    <item>
      <title>Is there a way to input .csv lookups in a tstats Heartbeat query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-input-csv-lookups-in-a-tstats-Heartbeat-query/m-p/646682#M223835</link>
      <description>&lt;P&gt;Hello! Rather than manually specifying the indexes I want to perform this heartbeat query on, I was wondering if there was a way to input a .csv lookup instead.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;| tstats latest(_time) as latest where index="index1" OR index="index2" earliest=-24h by index&lt;BR /&gt;| eval recent = if(latest &amp;gt; relative_time(now(),"-1m"),1,0), realLatest = strftime(latest,"%c")&lt;BR /&gt;| where recent=0&lt;BR /&gt;| fields- recent, latest&lt;BR /&gt;| rename realLatest as "Last Event Timestamp"&lt;/P&gt;
&lt;P&gt;The .csv would just contain a bunch of index names that we'd want to monitor, but so far I haven't been able to get around the fact that tstats must come first, and that the index argument does not accept complex inputs.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 13:34:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-input-csv-lookups-in-a-tstats-Heartbeat-query/m-p/646682#M223835</guid>
      <dc:creator>john_c_calhoun</dc:creator>
      <dc:date>2023-06-13T13:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: .csv Lookups in a tstats Heartbeat Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-input-csv-lookups-in-a-tstats-Heartbeat-query/m-p/646737#M223853</link>
      <description>&lt;P&gt;Have you tried a subsearch?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats latest(_time) as latest where [ | inputlookup indexes.csv | fields index | format ] earliest=-24h by index
| eval recent = if(latest &amp;gt; relative_time(now(),"-1m"),1,0), realLatest = strftime(latest,"%c")
| where recent=0
| fields- recent, latest
| rename realLatest as "Last Event Timestamp"&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Jun 2023 00:18:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-input-csv-lookups-in-a-tstats-Heartbeat-query/m-p/646737#M223853</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-06-13T00:18:39Z</dc:date>
    </item>
  </channel>
</rss>

