<?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: Create new events from search results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Create-new-events-from-search-results/m-p/63669#M15725</link>
    <description>&lt;P&gt;If you mean that you'd like to take some transformed results and re-index them as though they 
were events,  you're looking for 'summary indexing'. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/latest/Knowledge/Usesummaryindexing?r=searchtip" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/Knowledge/Usesummaryindexing?r=searchtip&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;However Im not sure that it &lt;EM&gt;is&lt;/EM&gt; what you're looking for.   I think you might just be looking to learn more about the search language itself.&lt;/P&gt;

&lt;P&gt;Lets say that  &lt;CODE&gt;&amp;lt;your search&amp;gt;&lt;/CODE&gt; matches a bunch of events, each event has a 'user' and a 'bytes' field,  and you want to end up with rows that are individual users,  you would just do something like: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt; | stats sum(bytes) by userid&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt; | timechart sum(bytes) by userid&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and I could go on describing common search language operators but we'd be here for hours. 
&lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Stats" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Stats&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Oct 2010 07:47:42 GMT</pubDate>
    <dc:creator>sideview</dc:creator>
    <dc:date>2010-10-05T07:47:42Z</dc:date>
    <item>
      <title>Create new events from search results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-new-events-from-search-results/m-p/63668#M15724</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;How can I use a search result to create a new set of events (with a new sourcetype)? I'd like to schedule a report to perform analysis on some data and transform those results into an entirely new data set.&lt;/P&gt;

&lt;P&gt;So far, I've only identified ways to append fields to an existing event. Is it possible to create entirely new events using the search language?&lt;/P&gt;

&lt;P&gt;Thanks,
Tim&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2010 06:21:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-new-events-from-search-results/m-p/63668#M15724</guid>
      <dc:creator>Tim</dc:creator>
      <dc:date>2010-10-05T06:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create new events from search results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-new-events-from-search-results/m-p/63669#M15725</link>
      <description>&lt;P&gt;If you mean that you'd like to take some transformed results and re-index them as though they 
were events,  you're looking for 'summary indexing'. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/latest/Knowledge/Usesummaryindexing?r=searchtip" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/Knowledge/Usesummaryindexing?r=searchtip&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;However Im not sure that it &lt;EM&gt;is&lt;/EM&gt; what you're looking for.   I think you might just be looking to learn more about the search language itself.&lt;/P&gt;

&lt;P&gt;Lets say that  &lt;CODE&gt;&amp;lt;your search&amp;gt;&lt;/CODE&gt; matches a bunch of events, each event has a 'user' and a 'bytes' field,  and you want to end up with rows that are individual users,  you would just do something like: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt; | stats sum(bytes) by userid&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt; | timechart sum(bytes) by userid&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and I could go on describing common search language operators but we'd be here for hours. 
&lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Stats" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Stats&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2010 07:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-new-events-from-search-results/m-p/63669#M15725</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-10-05T07:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create new events from search results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-new-events-from-search-results/m-p/63670#M15726</link>
      <description>&lt;P&gt;You may want to take a look at lookups.  This is a very helpful way to augment data to your events.  See the following page from the docs:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.splunk.com/base/Documentation/latest/User/CreateAndConfigureFieldLookups" rel="nofollow"&gt;Use field lookups to add information to your events&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;If you want to add fields to a specific event, that's more difficult to accomplish, but it can be done using lookups.  Take a look at this answer:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://answers.splunk.com/questions/3982/correlate-and-tag-splunk-events-with-change-control-tickets/4260#4260" rel="nofollow"&gt;Correlate (and tag!) Splunk events with Change Control Tickets&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;You would have to modify your application of this solution slightly, but the core idea is the same.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2010 20:08:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-new-events-from-search-results/m-p/63670#M15726</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-10-05T20:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create new events from search results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-new-events-from-search-results/m-p/63671#M15727</link>
      <description>&lt;P&gt;Only way which I have found so far is to use DB connect and create db output to database table as a middle man and then dbinput to take them back into splunk.&lt;BR /&gt;
 It is an ugly workaround, but it seems to be working.&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 08:35:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-new-events-from-search-results/m-p/63671#M15727</guid>
      <dc:creator>jkomarek</dc:creator>
      <dc:date>2019-05-31T08:35:49Z</dc:date>
    </item>
  </channel>
</rss>

