<?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 count number of events that occurred near different events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259277#M77723</link>
    <description>&lt;P&gt;Unfortunately it doesn't work correctly. Please remeber that I want to count values for each temperture bin and data are from different sources so have different timelines.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Oct 2016 20:21:57 GMT</pubDate>
    <dc:creator>xfiles80</dc:creator>
    <dc:date>2016-10-19T20:21:57Z</dc:date>
    <item>
      <title>How to count number of events that occurred near different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259275#M77721</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am a begginner and can't find solution for my problem.&lt;BR /&gt;
I have 3 fields: &lt;BR /&gt;
2 from one source&lt;BR /&gt;
Characteristic ( has Characteristic names)&lt;BR /&gt;
Value (has value of measured Characteristic)&lt;BR /&gt;
and one from another source&lt;BR /&gt;
Temprature (Temeprature during measurement)&lt;/P&gt;

&lt;P&gt;Time of Temperature recording and result recording are different so it should consider span=1hr&lt;BR /&gt;
I would like to receive information how many measurements above specific value were recorded and in what temperature it happened ie.&lt;/P&gt;

&lt;P&gt;Temp  No of meas.&lt;BR /&gt;
10-20  12&lt;BR /&gt;
21-30  35&lt;BR /&gt;
31-40  15&lt;/P&gt;

&lt;P&gt;Below serach string I tried to use:&lt;/P&gt;

&lt;P&gt;(Characteristic="char1" AND Value&amp;gt;"1.55") OR Temprature="*" |bin Temperature bins=10 |chart count(Value) by Temperature &lt;/P&gt;

&lt;P&gt;and received only 0 for counts. I suspect that I should use "transaction". I tried but I failed.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2016 08:43:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259275#M77721</guid>
      <dc:creator>xfiles80</dc:creator>
      <dc:date>2016-10-19T08:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to count number of events that occurred near different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259276#M77722</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(Characteristic="char1" AND Value&amp;gt;"1.55") OR Temprature="*" | convert num(Temperature) as Temperature | bin Temperature bins=10 | stats count by Temperature
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Oct 2016 13:26:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259276#M77722</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-19T13:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to count number of events that occurred near different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259277#M77723</link>
      <description>&lt;P&gt;Unfortunately it doesn't work correctly. Please remeber that I want to count values for each temperture bin and data are from different sources so have different timelines.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2016 20:21:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259277#M77723</guid>
      <dc:creator>xfiles80</dc:creator>
      <dc:date>2016-10-19T20:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to count number of events that occurred near different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259278#M77724</link>
      <description>&lt;P&gt;I will add some data examples:&lt;BR /&gt;
source1:&lt;BR /&gt;
Date/Time             Value&lt;BR /&gt;
2016-01-01 01:05 1.49&lt;BR /&gt;
2016-01-01 03:17 1.57&lt;BR /&gt;
2016-01-01 05:15 1.58&lt;BR /&gt;
2016-01-01 11:11 1.59&lt;BR /&gt;
2016-01-01 17:00 1.49&lt;BR /&gt;
2016-01-01 23:18 1.56&lt;/P&gt;

&lt;P&gt;source2:&lt;BR /&gt;
Date/Time             Temperature&lt;BR /&gt;
2016-01-01 01:00 23.1&lt;BR /&gt;
2016-01-01 01:10 23.9&lt;BR /&gt;
2016-01-01 03:00 24.1&lt;BR /&gt;
2016-01-01 03:15 24.2&lt;BR /&gt;
2016-01-01 05:11 25.0&lt;BR /&gt;
2016-01-01 05:20 23.0&lt;BR /&gt;
2016-01-01 11:10 30.0&lt;BR /&gt;
2016-01-01 16:50 27.7&lt;BR /&gt;
2016-01-01 23:20 25.5&lt;/P&gt;

&lt;P&gt;Output I want to have (number or values that were recorded in specific temprature):&lt;BR /&gt;
Temp.    Count(Value)&lt;BR /&gt;
24-25     1&lt;BR /&gt;
25-26     2&lt;BR /&gt;
26-27     0&lt;BR /&gt;
27-28     0&lt;BR /&gt;
28-29     0&lt;BR /&gt;
29-30     1&lt;BR /&gt;
30-31     0&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2016 11:26:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259278#M77724</guid>
      <dc:creator>xfiles80</dc:creator>
      <dc:date>2016-10-21T11:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to count number of events that occurred near different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259279#M77725</link>
      <description>&lt;P&gt;Ah!!! Missed that. What is common between the two sources that uniquely ties Temperation to Char &amp;amp; Values? Let's assume is called &lt;CODE&gt;id&lt;/CODE&gt;. Then try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(Characteristic="char1" AND Value&amp;gt;"1.55") OR Temprature="*"  | eventstats values(Temperature) as Temp  by id | where source="sourceforcharacteristcsfile" | bin Temperature bins=10 | stats count by Temperature
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Oct 2016 12:16:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259279#M77725</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-21T12:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to count number of events that occurred near different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259280#M77726</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(Characteristic="char1" AND Value&amp;gt;"1.55") OR Temprature="*" | sort 0 _time | filldown Temperature | where isnotnull(Value)
 |bin Temperature bins=10 |chart count(Value) by Temperature
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Oct 2016 14:40:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259280#M77726</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-10-21T14:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to count number of events that occurred near different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259281#M77727</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;(Characteristic="char1" AND Value&amp;gt;"1.55") OR Temprature="*" | sort 0 _time | filldown Temperature | where isnotnull(Value)
  |bin Temperature bins=10 |chart count(Value) by Temperature
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;works perfect&lt;BR /&gt;
Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 09:52:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259281#M77727</guid>
      <dc:creator>xfiles80</dc:creator>
      <dc:date>2016-10-27T09:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to count number of events that occurred near different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259282#M77728</link>
      <description>&lt;P&gt;Please accept the answer.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 11:37:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-number-of-events-that-occurred-near-different/m-p/259282#M77728</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-10-27T11:37:54Z</dc:date>
    </item>
  </channel>
</rss>

