<?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: Group By Replace in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Group-By-Replace/m-p/459523#M129693</link>
    <description>&lt;P&gt;While that didn't answer my question directly it led me in the right direction, thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2019 07:39:20 GMT</pubDate>
    <dc:creator>jasonhask</dc:creator>
    <dc:date>2019-05-16T07:39:20Z</dc:date>
    <item>
      <title>Group By Replace</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-By-Replace/m-p/459521#M129691</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have several things that come in via different &lt;CODE&gt;platforms&lt;/CODE&gt;: &lt;CODE&gt;Android&lt;/CODE&gt; (watch, phone, tablet), &lt;CODE&gt;iOS&lt;/CODE&gt; (Watch, Phone, Tablet), and &lt;CODE&gt;Web&lt;/CODE&gt;.  For counting purposes I just need to know the platform (for now). I was wondering if there was any way possible to group my &lt;CODE&gt;counts&lt;/CODE&gt; by my &lt;CODE&gt;replaces&lt;/CODE&gt;. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index =blah source=blah earliest=-16m@m latest=-1m@m 
| stats count(eval(Status=0 OR Status=1)) as Now by Platform
| replace android* with Android, *Web* with Web, ip* with iOS
| table Platform, Now
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As of now my results look like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Platform            Now
android              96
android               1
android            1306
iOS                3000
iOS                  45
iOS                   2
Web                1286
Web                 956
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I would like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Platform            Now
Android            1403
iOS                3047
Web                2242
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in advance for any help.&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 02:24:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-By-Replace/m-p/459521#M129691</guid>
      <dc:creator>jasonhask</dc:creator>
      <dc:date>2019-05-16T02:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Group By Replace</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-By-Replace/m-p/459522#M129692</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index =blah source=blah earliest=-16m@m latest=-1m@m 
| stats count(eval(Status=0 OR Status=1)) AS Now BY Platform
| replace android* with Android, *Web* with Web, ip* with iOS
| stats sum(Now) AS Now BY Platform
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 May 2019 03:26:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-By-Replace/m-p/459522#M129692</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-16T03:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Group By Replace</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-By-Replace/m-p/459523#M129693</link>
      <description>&lt;P&gt;While that didn't answer my question directly it led me in the right direction, thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 07:39:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-By-Replace/m-p/459523#M129693</guid>
      <dc:creator>jasonhask</dc:creator>
      <dc:date>2019-05-16T07:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Group By Replace</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-By-Replace/m-p/459524#M129694</link>
      <description>&lt;P&gt;OK, then do click &lt;CODE&gt;Accept&lt;/CODE&gt; on the answer to close the question.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 04:08:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-By-Replace/m-p/459524#M129694</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-17T04:08:20Z</dc:date>
    </item>
  </channel>
</rss>

