<?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: Merging results from two different searches in one fill chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Merging-results-from-two-different-searches-in-one-fill-chart/m-p/168527#M48064</link>
    <description>&lt;P&gt;I dont know if this is the most efficient way to do things, but here is how I merged two searches:&lt;/P&gt;

&lt;P&gt;sourcetype=cisco:ios AND %FW-6-DROP_PKT earliest=-7d@m latest=now | bucket _time span=1d | stats count by _time | stats avg(count) as AverageCountPerDay | eval AveragePerDay=round(AverageCountPerDay, 0) | fields - AverageCountPerDay | eval search=[search sourcetype=cisco:ios AND %FW-6-DROP_PKT earliest=-24h@m latest=now | stats count(src_ip_zbfw) | rename count(src_ip_zbfw) as search] | rename search as today | eval Diff=today-AveragePerDay | eval Today=Diff/today*100 | fieldformat "PercentChange" = tostring(round(Today,2))."%" | table PercentChange,today,Today&lt;/P&gt;

&lt;P&gt;You will see the 2nd search here: "eval search=[search sourcetype=cisco:ios AND %FW-6-DROP_PKT earliest=-24h@m latest=now | stats count(src_ip_zbfw) | rename count(src_ip_zbfw) as search]"&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:25:38 GMT</pubDate>
    <dc:creator>jordanperks</dc:creator>
    <dc:date>2020-09-28T15:25:38Z</dc:date>
    <item>
      <title>Merging results from two different searches in one fill chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-results-from-two-different-searches-in-one-fill-chart/m-p/168526#M48063</link>
      <description>&lt;P&gt;My company is currently trying to archive a large amount of older files; however, new files are coming in daily. We would like to know our percentage of files that have been archived is versus the total (to include the new images). I have both search results, but I can't seem to put them together. I'm pretty new to Splunk, and I tried using a join but I couldn't seem to figure it out so any assistance would be appreciated. Thank you in advance.&lt;/P&gt;

&lt;P&gt;Search 1:&lt;BR /&gt;
sourcetype="log.txt-3" status="*" | stats count as currProc | eval totalProc=(currProc+1525036) | eval percentage=round(totalProc*100/34937175,1) | stats sum(percentage)&lt;/P&gt;

&lt;P&gt;Search 2:&lt;BR /&gt;
source="C:\xxxxxx\serverstatus.log" successWrite="*" | stats count as new | eval totalDCM=(new+34937175) | stats sum(totalDCM)&lt;/P&gt;

&lt;P&gt;My goal is to add Search 2 to the percentage area, since Search 1 already does the percentage calculations.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-results-from-two-different-searches-in-one-fill-chart/m-p/168526#M48063</guid>
      <dc:creator>jbouch03</dc:creator>
      <dc:date>2020-09-28T15:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Merging results from two different searches in one fill chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-results-from-two-different-searches-in-one-fill-chart/m-p/168527#M48064</link>
      <description>&lt;P&gt;I dont know if this is the most efficient way to do things, but here is how I merged two searches:&lt;/P&gt;

&lt;P&gt;sourcetype=cisco:ios AND %FW-6-DROP_PKT earliest=-7d@m latest=now | bucket _time span=1d | stats count by _time | stats avg(count) as AverageCountPerDay | eval AveragePerDay=round(AverageCountPerDay, 0) | fields - AverageCountPerDay | eval search=[search sourcetype=cisco:ios AND %FW-6-DROP_PKT earliest=-24h@m latest=now | stats count(src_ip_zbfw) | rename count(src_ip_zbfw) as search] | rename search as today | eval Diff=today-AveragePerDay | eval Today=Diff/today*100 | fieldformat "PercentChange" = tostring(round(Today,2))."%" | table PercentChange,today,Today&lt;/P&gt;

&lt;P&gt;You will see the 2nd search here: "eval search=[search sourcetype=cisco:ios AND %FW-6-DROP_PKT earliest=-24h@m latest=now | stats count(src_ip_zbfw) | rename count(src_ip_zbfw) as search]"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:25:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-results-from-two-different-searches-in-one-fill-chart/m-p/168527#M48064</guid>
      <dc:creator>jordanperks</dc:creator>
      <dc:date>2020-09-28T15:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Merging results from two different searches in one fill chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-results-from-two-different-searches-in-one-fill-chart/m-p/168528#M48065</link>
      <description>&lt;P&gt;That worked...thanks. I really appreciate it. My final search string was:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="log.txt-3" status="*" | stats count as currProc | eval totalProc=(currProc+1525036) | eval search=[search source="C:\\xxxxx\\serverstatus.log" successWrite="*" | chart count as total | eval search=(total+34937175)] | rename search as totalDCM | eval percentage=round(totalProc*100/totalDCM,1) | stats sum(percentage)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks again!!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2013 14:50:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-results-from-two-different-searches-in-one-fill-chart/m-p/168528#M48065</guid>
      <dc:creator>jbouch03</dc:creator>
      <dc:date>2013-12-06T14:50:39Z</dc:date>
    </item>
  </channel>
</rss>

