<?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: Splunk Query to  Search to get value from the last event in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-get-value-from-the-last-event/m-p/611949#M212765</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248955"&gt;@Sanjana&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you could use stats and try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| stats max(propertyStartCount) AS propertyStartCount max(propertyEndCount) AS propertyEndCount BY chain nbProperties
| where propertyEndCount&amp;gt;propertyStartCount &lt;/LI-CODE&gt;&lt;P&gt;in this way you group transactions for chain and nbProperties and you have have only the transactions where start and end count are different.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 05 Sep 2022 12:05:11 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-09-05T12:05:11Z</dc:date>
    <item>
      <title>How to search to get value from the last event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-get-value-from-the-last-event/m-p/611947#M212763</link>
      <description>&lt;P&gt;Hello folks,&lt;/P&gt;&lt;P&gt;I have Logger lines as below:&lt;/P&gt;&lt;P&gt;job MONITOR-DESYNC-3-20I-ERNC: { "chain":"PR1", "nbProperties":1345, "propertyStartCount":1, "nbPropertyPerExecution":5, "propertyEndCount":6, "nbPropertyForCurrentExecution":5 }&lt;/P&gt;&lt;P&gt;job MONITOR-DESYNC-3-20I-ERNC: { "chain":"PR2", "nbProperties":1345, "propertyStartCount":6, "nbPropertyPerExecution":5, "propertyEndCount":11, "nbPropertyForCurrentExecution":5 }&lt;/P&gt;&lt;P&gt;------These lines continue till propertyEndCount = nbProperties but sometimes it does not get equal&amp;nbsp; and stops randomly like below.&lt;BR /&gt;This job stopped at "propertyEndCount":1076 only&lt;/P&gt;&lt;P&gt;job MONITOR-DESYNC-3-6AQ-Q7Z: { "chain":"PR1", "nbProperties":1345, "propertyStartCount":1071, "nbPropertyPerExecution":5, "propertyEndCount":1076, "nbPropertyForCurrentExecution":5 }&lt;/P&gt;&lt;P&gt;SPlunk query to find how many hotels got covered&amp;nbsp; for each chain . In this case&lt;BR /&gt;Output Expected is:&lt;/P&gt;&lt;P&gt;chain total-property&amp;nbsp; covered-property&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;PR1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1345&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1076&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;PR2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1345&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1000&lt;/P&gt;&lt;P&gt;I am quite new to splunk query. I think If somehow&amp;nbsp; I could fetch the value of&amp;nbsp;propertyEndCount from the last event then it should work.&lt;/P&gt;&lt;P&gt;If anyone can provide some solution to get as expected result mentioned above.&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 05:35:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-get-value-from-the-last-event/m-p/611947#M212763</guid>
      <dc:creator>Sanjana</dc:creator>
      <dc:date>2022-09-07T05:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to  Search to get value from the last event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-get-value-from-the-last-event/m-p/611949#M212765</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248955"&gt;@Sanjana&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you could use stats and try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| stats max(propertyStartCount) AS propertyStartCount max(propertyEndCount) AS propertyEndCount BY chain nbProperties
| where propertyEndCount&amp;gt;propertyStartCount &lt;/LI-CODE&gt;&lt;P&gt;in this way you group transactions for chain and nbProperties and you have have only the transactions where start and end count are different.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 12:05:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-get-value-from-the-last-event/m-p/611949#M212765</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-05T12:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to  Search to get value from the last event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-get-value-from-the-last-event/m-p/611966#M212771</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;But I am not able to fetch data as expected. No statistics is coming&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 13:58:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-get-value-from-the-last-event/m-p/611966#M212771</guid>
      <dc:creator>Sanjana</dc:creator>
      <dc:date>2022-09-05T13:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to  Search to get value from the last event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-get-value-from-the-last-event/m-p/611976#M212777</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248955"&gt;@Sanjana&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;sorry but I don't understand: why aren't you able to perform a stats command?&lt;/P&gt;&lt;P&gt;The problem is that you have many events and you need to take only the last value.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 14:43:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-get-value-from-the-last-event/m-p/611976#M212777</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-05T14:43:27Z</dc:date>
    </item>
  </channel>
</rss>

