<?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: Events list of append command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420657#M167174</link>
    <description>&lt;P&gt;@shayhibah &lt;/P&gt;

&lt;P&gt;ya you can use your own way here i mention head for examples purpose only .Just what i want to told here this is the syntax for how to append that's it.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2018 06:17:46 GMT</pubDate>
    <dc:creator>harishalipaka</dc:creator>
    <dc:date>2018-10-09T06:17:46Z</dc:date>
    <item>
      <title>Events list of append command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420654#M167171</link>
      <description>&lt;P&gt;I have a query like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;first_query | dedup 1 id | search action=drop | stats count by action, destination | fields action | stats count(eval(action=drop)) |
append [search second_query | dedup 1 id | search action=drop | stats count by action, source | fields action | stats count(eval(action=drop))]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;After pressing on "events" tab in search view, I get relevant logs only for the first query and not even 1 log of the second query.&lt;BR /&gt;
when running each query separately, the first_query gives me 11 events and the second_query gives me 71 events.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;How can I get all results of all appended queries (82 events)?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:34:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420654#M167171</guid>
      <dc:creator>shayhibah</dc:creator>
      <dc:date>2020-09-29T21:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Events list of append command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420655#M167172</link>
      <description>&lt;P&gt;hi @shayhibah &lt;/P&gt;

&lt;P&gt;did you try like this --&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="_internal" sourcetype=splunkd |head 10 |append [search index="_internal" sourcetype=splunkd_ui_access |head 5]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Oct 2018 06:04:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420655#M167172</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-10-09T06:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Events list of append command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420656#M167173</link>
      <description>&lt;P&gt;@harishalipaka &lt;BR /&gt;
Thank you for your response.&lt;BR /&gt;
This query works great but for some reason mine isn't.&lt;BR /&gt;
What can be the issue? I don't want to use 'head' in my query since I want to see all results.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 06:12:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420656#M167173</guid>
      <dc:creator>shayhibah</dc:creator>
      <dc:date>2018-10-09T06:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Events list of append command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420657#M167174</link>
      <description>&lt;P&gt;@shayhibah &lt;/P&gt;

&lt;P&gt;ya you can use your own way here i mention head for examples purpose only .Just what i want to told here this is the syntax for how to append that's it.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 06:17:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420657#M167174</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-10-09T06:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Events list of append command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420658#M167175</link>
      <description>&lt;P&gt;@harishalipaka &lt;BR /&gt;
I used your syntax (you can see it in the post above) but I does not work for me.&lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 06:19:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420658#M167175</guid>
      <dc:creator>shayhibah</dc:creator>
      <dc:date>2018-10-09T06:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Events list of append command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420659#M167176</link>
      <description>&lt;P&gt;not sure if your query is working separately as you have to rename stats-eval part else it will give error-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;first_query | dedup 1 id | search action=drop | stats count by action, destination | fields action | stats count(eval(action=drop)) as abc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Oct 2018 08:43:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420659#M167176</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-10-09T08:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Events list of append command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420660#M167177</link>
      <description>&lt;P&gt;Seems like you are trying to compare the number of distinct destinations that experienced a drop, compared to the number of distinct sources.  This can be done in a single combined query, without doing an append at all.  Whenever possible, you want to do your searches that way.&lt;/P&gt;

&lt;P&gt;If the two searches are returning the exact same records to be counted two different ways, you could do it completely using this format...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;( first_query ) OR ( second_query ) 
| dedup id
| search action=drop 
| stats dc(source) as source dc(destination) as destination
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On the other hand, if they are different record types, then try something like this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;( first_query ) OR ( second_query )
| eval thequery=case(first_query,"destination", second_query, "source")  
| dedup 1 id thequery
| eval field2=case(first_query,destination, second_query,source)
| search action=drop 
| stats dc(field2) as count by field2
| eval junk=1
| xyseries junk field2 count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note - If the different searches have different indexes or sourcetype, you could use that distinctive field instead of building the field &lt;CODE&gt;thequery&lt;/CODE&gt;. &lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 17:12:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420660#M167177</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-10-10T17:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Events list of append command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420661#M167178</link>
      <description>&lt;P&gt;What he said.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 17:32:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-list-of-append-command/m-p/420661#M167178</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-01-10T17:32:38Z</dc:date>
    </item>
  </channel>
</rss>

