<?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 edit my search to compare software version numbers to find the latest version? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284798#M86127</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc sourcetype=123 User=*  AppVersion | rex "AppVersion=(?&amp;lt;versionD1&amp;gt;\d+)" | rex "AppVersion=\d+.(?&amp;lt;versionD2&amp;gt;\d+)" | rex "AppVersion=\d+.\d+.(?&amp;lt;versionD3&amp;gt;\d+)" | sort User -versionD1 -versionD2 -versionD3 | streamstats count by User | where count=1 | eval Version = versionD1."."versionD2.".".versionD3 | fields User Version
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;*&lt;STRONG&gt;&lt;EM&gt;OR&lt;/EM&gt;&lt;/STRONG&gt;*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc sourcetype=123 User=*  AppVersion | rex "AppVersion=(?&amp;lt;versionD1&amp;gt;\d+)" | rex "AppVersion=\d+.(?&amp;lt;versionD2&amp;gt;\d+)" | rex "AppVersion=\d+.\d+.(?&amp;lt;versionD3&amp;gt;\d+)" | stats max(versionD1) as v1 max(versionD2) as v2 max(versionD3) as v3 by User | eval Version = v1."."v2.".".v3 | fields User Version
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Jul 2016 12:08:08 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-07-27T12:08:08Z</dc:date>
    <item>
      <title>How to edit my search to compare software version numbers to find the latest version?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284793#M86122</link>
      <description>&lt;P&gt;HI,  &lt;/P&gt;

&lt;P&gt;I have a field called &lt;STRONG&gt;AppVersion&lt;/STRONG&gt;. The field value represents the version of a piece of software.&lt;/P&gt;

&lt;P&gt;Example AppVersion = 3.0.1&lt;/P&gt;

&lt;P&gt;I am trying to return the most recent version of the App that a user has used.&lt;/P&gt;

&lt;P&gt;What I have tried was to break down the value into parts and add them together. The problem with this is, if the value is 3.0.1 or 2.2.0, the summed values are the same. Also, I was only able to display the summed value of the highest version, and not the field AppVersion that I want.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc sourcetype=123 User="john"  AppVersion | rex "AppVersion=(?&amp;lt;versionD1&amp;gt;\d+)" | rex "AppVersion=\d+.(?&amp;lt;versionD2&amp;gt;\d+)" | rex "AppVersion=\d+.\d+.(?&amp;lt;versionD3&amp;gt;\d+)"| eval version= versionD1 + versionD2 + versionD3 | dedup AppVersion | stats max(version) as maxVersion | fields maxVersion AppVersion
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 10:39:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284793#M86122</guid>
      <dc:creator>Aaron_Fogarty</dc:creator>
      <dc:date>2016-07-27T10:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare software version numbers to find the latest version?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284794#M86123</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc sourcetype=123 User="john"  AppVersion
| stats latest(AppVersion)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jul 2016 11:03:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284794#M86123</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2016-07-27T11:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare software version numbers to find the latest version?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284795#M86124</link>
      <description>&lt;P&gt;Hey HeinzWaescher, &lt;/P&gt;

&lt;P&gt;Thanks for the reply but this didnt work. It looks like latest() command returns the latest value by its time stamp.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 11:12:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284795#M86124</guid>
      <dc:creator>Aaron_Fogarty</dc:creator>
      <dc:date>2016-07-27T11:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare software version numbers to find the latest version?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284796#M86125</link>
      <description>&lt;P&gt;Yes it does, I thought that is your goal.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 11:13:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284796#M86125</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2016-07-27T11:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare software version numbers to find the latest version?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284797#M86126</link>
      <description>&lt;P&gt;No not by time but by the value of the field AppVersion. I am looking to return the latest Version of the of  the software. &lt;/P&gt;

&lt;P&gt;For Example if the values  are&lt;/P&gt;

&lt;P&gt;AppVersion = 3.0.1&lt;BR /&gt;
and&lt;BR /&gt;
AppVersion = 2.2.0&lt;/P&gt;

&lt;P&gt;The latest version in this case would be 3.0.1 and that is the value I want returned.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 11:48:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284797#M86126</guid>
      <dc:creator>Aaron_Fogarty</dc:creator>
      <dc:date>2016-07-27T11:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare software version numbers to find the latest version?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284798#M86127</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc sourcetype=123 User=*  AppVersion | rex "AppVersion=(?&amp;lt;versionD1&amp;gt;\d+)" | rex "AppVersion=\d+.(?&amp;lt;versionD2&amp;gt;\d+)" | rex "AppVersion=\d+.\d+.(?&amp;lt;versionD3&amp;gt;\d+)" | sort User -versionD1 -versionD2 -versionD3 | streamstats count by User | where count=1 | eval Version = versionD1."."versionD2.".".versionD3 | fields User Version
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;*&lt;STRONG&gt;&lt;EM&gt;OR&lt;/EM&gt;&lt;/STRONG&gt;*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc sourcetype=123 User=*  AppVersion | rex "AppVersion=(?&amp;lt;versionD1&amp;gt;\d+)" | rex "AppVersion=\d+.(?&amp;lt;versionD2&amp;gt;\d+)" | rex "AppVersion=\d+.\d+.(?&amp;lt;versionD3&amp;gt;\d+)" | stats max(versionD1) as v1 max(versionD2) as v2 max(versionD3) as v3 by User | eval Version = v1."."v2.".".v3 | fields User Version
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jul 2016 12:08:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284798#M86127</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-27T12:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare software version numbers to find the latest version?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284799#M86128</link>
      <description>&lt;P&gt;what about &lt;/P&gt;

&lt;P&gt;| rex field=AppVersion "(?.&lt;EM&gt;).(?&lt;B&gt;.&lt;/B&gt;&lt;/EM&gt;&lt;B&gt;).(?.*)"&lt;BR /&gt;
| eval AppVersion=a."".b."".c&lt;BR /&gt;
| stats max(AppVersion)&lt;BR /&gt;
&lt;/B&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 12:08:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284799#M86128</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2016-07-27T12:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare software version numbers to find the latest version?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284800#M86129</link>
      <description>&lt;P&gt;Hey HeinzWaescher ,&lt;BR /&gt;
I could not get this to work either.&lt;BR /&gt;
but Thanks again &lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 12:29:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284800#M86129</guid>
      <dc:creator>Aaron_Fogarty</dc:creator>
      <dc:date>2016-07-27T12:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to compare software version numbers to find the latest version?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284801#M86130</link>
      <description>&lt;P&gt;The first example works great.&lt;BR /&gt;
Thanks sundareshr&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 12:30:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-compare-software-version-numbers-to/m-p/284801#M86130</guid>
      <dc:creator>Aaron_Fogarty</dc:creator>
      <dc:date>2016-07-27T12:30:06Z</dc:date>
    </item>
  </channel>
</rss>

