<?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 Splunk7: Status = Count Up when PV's Value transits from 0 to 1 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374416#M110058</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;
I'm new to Splunk. Need advice. Want to do a count-up (Step) when a Tag's value (PV) transits from 0 to 1.  Step is a new field.&lt;BR /&gt;
_time   PV  Step&lt;BR /&gt;
3/24/2018 11:00:00  1   0&lt;BR /&gt;
3/24/2018 11:00:01  1   0&lt;BR /&gt;
3/24/2018 11:00:02  1   0&lt;BR /&gt;
3/24/2018 11:00:03  0   0&lt;BR /&gt;
3/24/2018 11:00:04  0   0&lt;BR /&gt;
3/24/2018 11:00:05  1   1&lt;BR /&gt;
3/24/2018 11:00:06  1   2&lt;BR /&gt;
3/24/2018 11:00:07  1   3&lt;BR /&gt;
3/24/2018 11:00:08  1   4&lt;BR /&gt;
3/24/2018 11:00:09  0   0&lt;BR /&gt;
3/24/2018 11:00:10  0   0&lt;BR /&gt;
3/24/2018 11:00:11  0   0&lt;BR /&gt;
3/24/2018 11:00:12  0   0&lt;BR /&gt;
3/24/2018 11:00:13  0   0&lt;BR /&gt;
3/24/2018 11:00:14  1   1&lt;BR /&gt;
3/24/2018 11:00:15  1   2&lt;BR /&gt;
3/24/2018 11:00:16  1   3&lt;BR /&gt;
3/24/2018 11:00:17  1   4&lt;BR /&gt;
3/24/2018 11:00:18  1   5&lt;BR /&gt;
3/24/2018 11:00:19  1   6&lt;BR /&gt;
3/24/2018 11:00:20  1   7&lt;BR /&gt;
3/24/2018 11:00:21  0   0&lt;BR /&gt;
3/24/2018 11:00:22  0   0&lt;BR /&gt;
3/24/2018 11:00:23  0   0&lt;BR /&gt;
3/24/2018 11:00:24  0   0&lt;BR /&gt;
3/24/2018 11:00:25  0   0&lt;/P&gt;

&lt;P&gt;Pls. advise. Thanks&lt;/P&gt;</description>
    <pubDate>Sat, 24 Mar 2018 07:51:30 GMT</pubDate>
    <dc:creator>htkwan</dc:creator>
    <dc:date>2018-03-24T07:51:30Z</dc:date>
    <item>
      <title>Splunk7: Status = Count Up when PV's Value transits from 0 to 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374416#M110058</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I'm new to Splunk. Need advice. Want to do a count-up (Step) when a Tag's value (PV) transits from 0 to 1.  Step is a new field.&lt;BR /&gt;
_time   PV  Step&lt;BR /&gt;
3/24/2018 11:00:00  1   0&lt;BR /&gt;
3/24/2018 11:00:01  1   0&lt;BR /&gt;
3/24/2018 11:00:02  1   0&lt;BR /&gt;
3/24/2018 11:00:03  0   0&lt;BR /&gt;
3/24/2018 11:00:04  0   0&lt;BR /&gt;
3/24/2018 11:00:05  1   1&lt;BR /&gt;
3/24/2018 11:00:06  1   2&lt;BR /&gt;
3/24/2018 11:00:07  1   3&lt;BR /&gt;
3/24/2018 11:00:08  1   4&lt;BR /&gt;
3/24/2018 11:00:09  0   0&lt;BR /&gt;
3/24/2018 11:00:10  0   0&lt;BR /&gt;
3/24/2018 11:00:11  0   0&lt;BR /&gt;
3/24/2018 11:00:12  0   0&lt;BR /&gt;
3/24/2018 11:00:13  0   0&lt;BR /&gt;
3/24/2018 11:00:14  1   1&lt;BR /&gt;
3/24/2018 11:00:15  1   2&lt;BR /&gt;
3/24/2018 11:00:16  1   3&lt;BR /&gt;
3/24/2018 11:00:17  1   4&lt;BR /&gt;
3/24/2018 11:00:18  1   5&lt;BR /&gt;
3/24/2018 11:00:19  1   6&lt;BR /&gt;
3/24/2018 11:00:20  1   7&lt;BR /&gt;
3/24/2018 11:00:21  0   0&lt;BR /&gt;
3/24/2018 11:00:22  0   0&lt;BR /&gt;
3/24/2018 11:00:23  0   0&lt;BR /&gt;
3/24/2018 11:00:24  0   0&lt;BR /&gt;
3/24/2018 11:00:25  0   0&lt;/P&gt;

&lt;P&gt;Pls. advise. Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 24 Mar 2018 07:51:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374416#M110058</guid>
      <dc:creator>htkwan</dc:creator>
      <dc:date>2018-03-24T07:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk7: Status = Count Up when PV's Value transits from 0 to 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374417#M110059</link>
      <description>&lt;P&gt;Hi  htkwan,&lt;BR /&gt;
if you want to know when PV transit from 0 to 1 you could run a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_index PV=1
| table _time PV Step
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if you want to know how many times PV passed from 0 to 1 you could run:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_index PV=1
| stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 24 Mar 2018 08:07:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374417#M110059</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-03-24T08:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk7: Status = Count Up when PV's Value transits from 0 to 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374418#M110060</link>
      <description>&lt;P&gt;0 to 1 and 1 to 0 is not the same thing &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Mar 2018 08:17:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374418#M110060</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-24T08:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk7: Status = Count Up when PV's Value transits from 0 to 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374419#M110061</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;Please try this code to count 0 to 1 transitions:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearch
    | delta PV as Transition
    | stats sum(eval(if(Transition==1,1,0))) as 0_to_1_Transitions
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Mar 2018 08:28:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374419#M110061</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-24T08:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk7: Status = Count Up when PV's Value transits from 0 to 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374420#M110062</link>
      <description>&lt;P&gt;Hello Giuseppe,&lt;BR /&gt;
I'm sorry. I've not explained well. I want to know when the PV transits from 0 to 1 (i.e. start of a process run), and a count-up of the events in the run. There can be a number of runs. Pls. refer to my table. There are 2 runs. 1st run has 4 events; while 2nd run has 7 events. Later, i want to compare the runs' countup, say Run 1 &amp;amp; 2 at Step 3.&lt;/P&gt;

&lt;P&gt;Pls. advise. Thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Mar 2018 08:34:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374420#M110062</guid>
      <dc:creator>htkwan</dc:creator>
      <dc:date>2018-03-24T08:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk7: Status = Count Up when PV's Value transits from 0 to 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374421#M110063</link>
      <description>&lt;P&gt;And if you want run count for each transition too, try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; yoursearch
    | delta PV as Transition
    | sort -_time
    | streamstats sum(PV) as RunCount reset_before=PV=0
    | where Transition=1
    | eventstats sum(eval(if(Transition==1,1,0))) as 0_to_1_Transitions
    | stats values(RunCount) as RunCount, values(_time) as Time by 0_to_1_Transitions
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Mar 2018 08:49:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374421#M110063</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-24T08:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk7: Status = Count Up when PV's Value transits from 0 to 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374422#M110064</link>
      <description>&lt;P&gt;Hello tiagofbmm,&lt;BR /&gt;
I'm interested in the countup when the PV transits from 0 to 1, not the total number of transitions. Pls advise. Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 24 Mar 2018 09:09:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374422#M110064</guid>
      <dc:creator>htkwan</dc:creator>
      <dc:date>2018-03-24T09:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk7: Status = Count Up when PV's Value transits from 0 to 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374423#M110065</link>
      <description>&lt;P&gt;Did you try this search? &lt;STRONG&gt;It counts when the PV transits from 0 to 1 and also gives you the run count&lt;/STRONG&gt;. Try it and let me know&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  yoursearch
     | delta PV as Transition
     | sort -_time
     | streamstats sum(PV) as RunCount reset_before=PV=0
     | where Transition=1
     | eventstats sum(eval(if(Transition==1,1,0))) as 0_to_1_Transitions
     | stats values(RunCount) as RunCount, values(_time) as Time by 0_to_1_Transitions
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Mar 2018 09:12:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374423#M110065</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-24T09:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk7: Status = Count Up when PV's Value transits from 0 to 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374424#M110066</link>
      <description>&lt;P&gt;Hello tiagofbmm,&lt;BR /&gt;
Just try. I need the "Step" to count when the PV transits from 0 to 1. See, below, a sample result (table). I'll need the Step for further work. I appreciate your advice.&lt;/P&gt;

&lt;P&gt;_time PV Step&lt;BR /&gt;
3/24/2018 11:00:00 1 0&lt;BR /&gt;
3/24/2018 11:00:01 1 0&lt;BR /&gt;
3/24/2018 11:00:02 1 0&lt;BR /&gt;
3/24/2018 11:00:03 0 0&lt;BR /&gt;
3/24/2018 11:00:04 0 0&lt;BR /&gt;
3/24/2018 11:00:05 1 1&lt;BR /&gt;
3/24/2018 11:00:06 1 2&lt;BR /&gt;
3/24/2018 11:00:07 1 3&lt;BR /&gt;
3/24/2018 11:00:08 1 4&lt;BR /&gt;
3/24/2018 11:00:09 0 0&lt;BR /&gt;
3/24/2018 11:00:10 0 0&lt;BR /&gt;
3/24/2018 11:00:11 0 0&lt;BR /&gt;
3/24/2018 11:00:12 0 0&lt;BR /&gt;
3/24/2018 11:00:13 0 0&lt;BR /&gt;
3/24/2018 11:00:14 1 1&lt;BR /&gt;
3/24/2018 11:00:15 1 2&lt;BR /&gt;
3/24/2018 11:00:16 1 3&lt;BR /&gt;
3/24/2018 11:00:17 1 4&lt;BR /&gt;
3/24/2018 11:00:18 1 5&lt;BR /&gt;
3/24/2018 11:00:19 1 6&lt;BR /&gt;
3/24/2018 11:00:20 1 7&lt;BR /&gt;
3/24/2018 11:00:21 0 0&lt;BR /&gt;
3/24/2018 11:00:22 0 0&lt;BR /&gt;
3/24/2018 11:00:23 0 0&lt;BR /&gt;
3/24/2018 11:00:24 0 0&lt;BR /&gt;
3/24/2018 11:00:25 0 0&lt;/P&gt;</description>
      <pubDate>Sat, 24 Mar 2018 10:02:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374424#M110066</guid>
      <dc:creator>htkwan</dc:creator>
      <dc:date>2018-03-24T10:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk7: Status = Count Up when PV's Value transits from 0 to 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374425#M110067</link>
      <description>&lt;P&gt;This way you still keep the PV&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearch
    | delta PV as Transition
    | sort -_time
    | streamstats sum(PV) as RunCount reset_before=PV=0
    | eventstats sum(eval(if(Transition==1,1,0))) as Total_0_to_1_Transitions
    | fields _time, RunCount, PV, Total_0_to_1_Transitions
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Mar 2018 10:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374425#M110067</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-24T10:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk7: Status = Count Up when PV's Value transits from 0 to 1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374426#M110068</link>
      <description>&lt;P&gt;Please let me know if the answer was useful for you. If it was, accept it and upvote. If not, give us more input so we can help you with that&lt;/P&gt;</description>
      <pubDate>Sun, 25 Mar 2018 17:18:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk7-Status-Count-Up-when-PV-s-Value-transits-from-0-to-1/m-p/374426#M110068</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-25T17:18:58Z</dc:date>
    </item>
  </channel>
</rss>

