<?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: calculate delta of success rate of a particular field for two hosts in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470328#M132337</link>
    <description>&lt;P&gt;Maybe this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | bin _time span=1h 
| stats dc(Resp) AS Resp dc(Req) AS Req BY _time host
| eval Success_Rate = 100 * (Resp / Req) 
| streamstats current=f last(Success_Rate) AS Next_Success_Rate BY host
| eval Delta_of_Success_Rate = Next_Success_Rate - Success_Rate
| timechart span=1h first(Delta_of_Success_Rate) AS Delta_of_Success_Rate BY host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 28 Dec 2019 23:02:45 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-12-28T23:02:45Z</dc:date>
    <item>
      <title>calculate delta of success rate of a particular field for two hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470326#M132335</link>
      <description>&lt;P&gt;can you please help me in writing SPL query for the below scenario.&lt;BR /&gt;
I want to calculate delta of success rate of a particular field for two servers.&lt;/P&gt;

&lt;P&gt;I used the below query:&lt;BR /&gt;
.....|stats values(Resp) as Resp values(Req) as Required by _time,host | eval Success_Rate= (Resp/Req)*100 |delta Success_Rate as Delta_of_Success_Rate | xyseries _time host Delta_of_Success_Rate&lt;/P&gt;

&lt;P&gt;Here, splunk is calculating the delta according to values listed in the statistics. Can you please or correct this query to calculating delta value for each host&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:26:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470326#M132335</guid>
      <dc:creator>yamini_37</dc:creator>
      <dc:date>2020-09-30T03:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: calculate delta of success rate of a particular field for two hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470327#M132336</link>
      <description>&lt;P&gt;Can you give an example and desired output?&lt;/P&gt;

&lt;P&gt;Does it look like:&lt;/P&gt;

&lt;P&gt;host time delta &lt;BR /&gt;
a        1&lt;BR /&gt;&lt;BR /&gt;
a         2&lt;BR /&gt;
b         1&lt;BR /&gt;
b          2&lt;/P&gt;

&lt;P&gt;and you want it to just be for one host? sorted by host? thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2019 21:48:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470327#M132336</guid>
      <dc:creator>aberkow</dc:creator>
      <dc:date>2019-12-28T21:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: calculate delta of success rate of a particular field for two hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470328#M132337</link>
      <description>&lt;P&gt;Maybe this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | bin _time span=1h 
| stats dc(Resp) AS Resp dc(Req) AS Req BY _time host
| eval Success_Rate = 100 * (Resp / Req) 
| streamstats current=f last(Success_Rate) AS Next_Success_Rate BY host
| eval Delta_of_Success_Rate = Next_Success_Rate - Success_Rate
| timechart span=1h first(Delta_of_Success_Rate) AS Delta_of_Success_Rate BY host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 Dec 2019 23:02:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470328#M132337</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-12-28T23:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: calculate delta of success rate of a particular field for two hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470329#M132338</link>
      <description>&lt;P&gt;I am getting the below output:&lt;/P&gt;

&lt;P&gt;time                            host    sucess_rate Delta_of_sucess_rate&lt;BR /&gt;
12/29/19 08:40 AM   XM1 100 &lt;BR /&gt;
12/29/19 08:40 AM   XM2 98                           -2&lt;BR /&gt;
12/29/19 08:45 AM   XM1 99                            1&lt;BR /&gt;
12/29/19 08:45 AM   XM2 100                           1&lt;BR /&gt;
12/29/19 08:50 AM   XM1 96                           -4&lt;BR /&gt;
12/29/19 08:50 AM   XM2 95                           -1&lt;/P&gt;

&lt;P&gt;The above is calculating delta incorrectly. I want to display the below desired output.&lt;/P&gt;

&lt;P&gt;time                            host    sucess_rate Delta_of_sucess_rate&lt;BR /&gt;
12/29/19 08:40 AM   XM1 100 &lt;BR /&gt;
12/29/19 08:45 AM   XM1 99                           -1&lt;BR /&gt;
12/29/19 08:50 AM   XM1 96                           -3&lt;BR /&gt;
12/29/19 08:40 AM   XM2 98&lt;BR /&gt;&lt;BR /&gt;
12/29/19 08:45 AM   XM2 100                           2&lt;BR /&gt;
12/29/19 08:50 AM   XM2 95                           -5&lt;/P&gt;

&lt;P&gt;OR &lt;/P&gt;

&lt;P&gt;time                       success_XM1  delta_success_host(XM1)     success_XM2      delta_success_host(XM2)&lt;BR /&gt;
12/29/19 08:40 AM   100                                                                             98&lt;BR /&gt;&lt;BR /&gt;
12/29/19 08:45 AM   99                              -1                                          100                 2&lt;BR /&gt;
12/29/19 08:50 AM   96                              -3                                              95                 -5&lt;/P&gt;

&lt;P&gt;Finally, I want to show the delta values of two hosts in one panel by time. can you please help me on this. Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:26:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470329#M132338</guid>
      <dc:creator>yamini_37</dc:creator>
      <dc:date>2020-09-30T03:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: calculate delta of success rate of a particular field for two hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470330#M132339</link>
      <description>&lt;P&gt;My desired output should be like:&lt;/P&gt;

&lt;P&gt;Time    Delta(host 1)        Delta(host 2)&lt;/P&gt;

&lt;P&gt;I didn't sort it by host. I will try like that. &lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2019 08:27:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470330#M132339</guid>
      <dc:creator>yamini_37</dc:creator>
      <dc:date>2019-12-29T08:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: calculate delta of success rate of a particular field for two hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470331#M132340</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults count=2 
| streamstats count 
| eval _time=if(count=2,relative_time(_time,"-1d@m"),_time) 
| makecontinuous span=1m _time 
| eval host="host".(random() % 2 + 1) 
| eval Resp=random() % 5 + 1, Req=random() % 5 + 1 
| bin span=1h _time 
| stats sum(Resp) as Resp sum(Req) as Required by _time,host 
| eval Success_Rate= round((Resp/Required)*100) 
| reverse 
| delta Success_Rate as Delta_of_Success_Rate 
| xyseries _time host Delta_of_Success_Rate
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, folks. I think that if you use &lt;CODE&gt;reverse&lt;/CODE&gt;, it works properly&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2019 08:49:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470331#M132340</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-29T08:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: calculate delta of success rate of a particular field for two hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470332#M132341</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval temp="Time: 21:30
Total: 60 Running: 05
mt100 pool1    /root/user/bin/process1.sh
mt100 pool12    /root/user/bin/process21.deb
mt201 pool2    /root/user/bin/process321.sh
mt301 pool3    /root/user/bin/process432.deb
mt301 pool312    /root/user/bin/process52.sh" 
| makemv delim="
" temp
| mvexpand temp
| rename temp as _raw
| erex processname examples="/root/user/binprocess1.sh,/root/user/bin/process21.deb"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also please.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2019 08:58:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/calculate-delta-of-success-rate-of-a-particular-field-for-two/m-p/470332#M132341</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-29T08:58:58Z</dc:date>
    </item>
  </channel>
</rss>

