<?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: | tstats to include data enrichment from a lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/tstats-to-include-data-enrichment-from-a-lookup/m-p/397844#M168775</link>
    <description>&lt;P&gt;This is very straight-forward so perhaps you are not including all the details.  This should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE index=bla sourcetype=bla by dest
| lookup bad_ip.csv bad_host AS dest OUTPUT dest, country, lat, lon, dateadded
| where isnotnull(dest)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 30 Jun 2018 22:53:32 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2018-06-30T22:53:32Z</dc:date>
    <item>
      <title>| tstats to include data enrichment from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/tstats-to-include-data-enrichment-from-a-lookup/m-p/397841#M168772</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;How can I use a tstats search, to match against a result and then OUTPUT additional content from the lookup where the match is seen?&lt;/P&gt;

&lt;P&gt;Tried variations on the following to no avail.&lt;/P&gt;

&lt;P&gt;| tstats count WHERE index=bla sourcetype=bla by dest | lookup bad_ip.csv bad_host AS dest | OUTPUT dest, country, lat, lon, dateadded&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:06:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/tstats-to-include-data-enrichment-from-a-lookup/m-p/397841#M168772</guid>
      <dc:creator>jacqu3sy</dc:creator>
      <dc:date>2020-09-29T20:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: | tstats to include data enrichment from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/tstats-to-include-data-enrichment-from-a-lookup/m-p/397842#M168773</link>
      <description>&lt;P&gt;Assuming that everything after &lt;CODE&gt;OUTPUT&lt;/CODE&gt; is a list of fields that are in bad_ip.csv, and the field bad_host in the csv is in the same data format as the field dest, then just get rid of the unnecessary pipe between &lt;CODE&gt;dest&lt;/CODE&gt; and &lt;CODE&gt;OUTPUT&lt;/CODE&gt;, and list only the output fields you want. (Dest is unneeded).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE index=bla sourcetype=bla by dest 
| lookup bad_ip.csv bad_host AS dest OUTPUT country, lat, lon, dateadded
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.1/SearchReference/Lookup" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.1/SearchReference/Lookup&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:02:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/tstats-to-include-data-enrichment-from-a-lookup/m-p/397842#M168773</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2020-09-29T20:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: | tstats to include data enrichment from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/tstats-to-include-data-enrichment-from-a-lookup/m-p/397843#M168774</link>
      <description>&lt;P&gt;Didnt work. It just pulls back every dest value seen within the index / sourcetype. I only want to pull back dest values where it matches a value in the csv.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 08:41:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/tstats-to-include-data-enrichment-from-a-lookup/m-p/397843#M168774</guid>
      <dc:creator>jacqu3sy</dc:creator>
      <dc:date>2018-06-21T08:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: | tstats to include data enrichment from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/tstats-to-include-data-enrichment-from-a-lookup/m-p/397844#M168775</link>
      <description>&lt;P&gt;This is very straight-forward so perhaps you are not including all the details.  This should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE index=bla sourcetype=bla by dest
| lookup bad_ip.csv bad_host AS dest OUTPUT dest, country, lat, lon, dateadded
| where isnotnull(dest)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 30 Jun 2018 22:53:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/tstats-to-include-data-enrichment-from-a-lookup/m-p/397844#M168775</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-06-30T22:53:32Z</dc:date>
    </item>
  </channel>
</rss>

