<?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: How to create a timeseries that is derived by dividing similar columns from two other timeseries in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timeseries-that-is-derived-by-dividing-similar/m-p/176185#M50591</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index= .... | bucket span=1h _time 
| stats count(client_ip) as Calls  count(IPAddress) AS Fails
|timechart per_hour(eval(Fails/Calls*100)) as  Percent_Fails
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 18 Mar 2015 10:32:51 GMT</pubDate>
    <dc:creator>btt</dc:creator>
    <dc:date>2015-03-18T10:32:51Z</dc:date>
    <item>
      <title>How to create a timeseries that is derived by dividing similar columns from two other timeseries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timeseries-that-is-derived-by-dividing-similar/m-p/176184#M50590</link>
      <description>&lt;P&gt;Once search query allows me to get the total percentage of failed calls in a 24 hour window&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index= ...  | stats count(client_ip) as Calls | appendcols [ search index=...  | stats count(IPAddress) AS Fails] |  eval "Percent Fails"=Fails/Calls*100 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I put the base searches of each the above two searches into the variables A and B, I get&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    A  | stats count(client_ip) as Calls | appendcols [ B | stats count(IPAddress) AS Fails] |  eval "Percent Fails"=Fails/Calls*100 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can also create a timeseries for the number of calls and the number of fails by the following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;A | timechart count span=1h
B | timechart count span=1h 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there a way that I can combine the two? I want to be able to get a timeseries of the percentage of failed calls per hour over the last 24 hours.&lt;/P&gt;

&lt;P&gt;Essentially, this would equate to taking each hour in B and dividing it by the same hour in A. Does anyone have any idea of how to do this?  &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 22:00:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timeseries-that-is-derived-by-dividing-similar/m-p/176184#M50590</guid>
      <dc:creator>Splunkster45</dc:creator>
      <dc:date>2015-03-12T22:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timeseries that is derived by dividing similar columns from two other timeseries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timeseries-that-is-derived-by-dividing-similar/m-p/176185#M50591</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index= .... | bucket span=1h _time 
| stats count(client_ip) as Calls  count(IPAddress) AS Fails
|timechart per_hour(eval(Fails/Calls*100)) as  Percent_Fails
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Mar 2015 10:32:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timeseries-that-is-derived-by-dividing-similar/m-p/176185#M50591</guid>
      <dc:creator>btt</dc:creator>
      <dc:date>2015-03-18T10:32:51Z</dc:date>
    </item>
  </channel>
</rss>

