<?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: Add search results to lookup AND send entire lookup by email in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613412#M213186</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248885"&gt;@spadler&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the searches in both report and add lookup I suppose are the same.&lt;/P&gt;&lt;P&gt;So you could run your search in an alert, sending the csv as attachment and adding at the end of the search the outputlookup command that saves the search results in a lookup.&lt;/P&gt;&lt;P&gt;In this way you have with one search both the lookup and the attachement because the outputlookup doesn't change the results to send as alert attachement.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 13:44:04 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-09-16T13:44:04Z</dc:date>
    <item>
      <title>How do I add search results to lookup AND send entire lookup by email?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613409#M213184</link>
      <description>&lt;P&gt;I was asked to archive search results in a CSV then send those results periodically by email. My solution is to do this in 2 reports. The first report runs the search and appends the results to a lookup. The second just grabs the entire lookup (| inputlookup my_lookup.csv) then emails the results as a CSV.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This seems to work fine but I feel like there should be a more elegant solution, like in only one search/report. I'm curious about what others think.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 14:51:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613409#M213184</guid>
      <dc:creator>spadler</dc:creator>
      <dc:date>2022-09-16T14:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Add search results to lookup AND send entire lookup by email</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613412#M213186</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248885"&gt;@spadler&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the searches in both report and add lookup I suppose are the same.&lt;/P&gt;&lt;P&gt;So you could run your search in an alert, sending the csv as attachment and adding at the end of the search the outputlookup command that saves the search results in a lookup.&lt;/P&gt;&lt;P&gt;In this way you have with one search both the lookup and the attachement because the outputlookup doesn't change the results to send as alert attachement.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:44:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613412#M213186</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-16T13:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Add search results to lookup AND send entire lookup by email</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613413#M213187</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;This sounds like a working solution. Me personally would first try to create an alert instead of report and set the trigger to "send email" there you can select "attach CSV".. should do the same with one object to maintain.&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613413#M213187</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2022-09-16T13:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Add search results to lookup AND send entire lookup by email</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613436#M213197</link>
      <description>&lt;P&gt;I tried your suggestion with the following in an alert. While it performs the search, updates the lookup, and sends the lookup CSV by email, it overwrites the lookup data. I need it to append the latest search results to the lookup, then send the updated CSV by email.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MY_SEARCH
|timechart span=10m count BY status
| outputlookup my_lookup.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 15:22:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613436#M213197</guid>
      <dc:creator>spadler</dc:creator>
      <dc:date>2022-09-16T15:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Add search results to lookup AND send entire lookup by email</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613438#M213198</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248885"&gt;@spadler&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MY_SEARCH
| append [ | inputlookup your_lookup.csv | fields _time status count ]
| timechart span=10m count BY status
| outputlookup my_lookup.csv&lt;/LI-CODE&gt;&lt;P&gt;Otherwise, the only solution is two different objects.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 15:32:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613438#M213198</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-16T15:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add search results to lookup AND send entire lookup by email?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613494#M213219</link>
      <description>&lt;P&gt;If you have outbound mail setup you can use&amp;nbsp;&lt;EM&gt;|sendmail&lt;/EM&gt; after the outputlookup. This this works for me, and Im able to receive csv files attached that were produced by the outputlookup:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;mysearch | outputlookup mylookup.csv | sendmail to="abc@xyz.com"  sendcsv=true&lt;/LI-CODE&gt;&lt;P&gt;See these docs:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.1/SearchReference/Sendemail" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.1/SearchReference/Sendemail&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Sendemail" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Sendemail&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Sep 2022 05:45:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-search-results-to-lookup-AND-send-entire-lookup-by/m-p/613494#M213219</guid>
      <dc:creator>nyc_jason</dc:creator>
      <dc:date>2022-09-17T05:45:42Z</dc:date>
    </item>
  </channel>
</rss>

