<?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 Different Sources in One Query in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Group-Different-Sources-in-One-Query/m-p/559447#M6381</link>
    <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;dedup&lt;/FONT&gt; command is redundant when &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; is used and &lt;FONT face="courier new,courier"&gt;timechart&lt;/FONT&gt; often (but not always) is redundant to &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt;.&amp;nbsp; Have you tried just &lt;FONT face="courier new,courier"&gt;timechart&lt;/FONT&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=license_compliance OR source="/license_compliance-splunk-data/iCinga_ingest/*"
| rex field=source "\/license_compliance-splunk-data\/iCinga_ingest\/(?&amp;lt;log_source&amp;gt;\w)" 
| eval log_source="iCinga_ingest".log_source 
| timechart span=1d count(name) by log_source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jul 2021 17:57:53 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-07-14T17:57:53Z</dc:date>
    <item>
      <title>Group Different Sources in One Query</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Group-Different-Sources-in-One-Query/m-p/559433#M6379</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running Splunk 8.1.2 and I'm trying to&amp;nbsp;&lt;SPAN&gt;group different sources of an Index to count them within one query.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The following fields are what I'm trying to group:&lt;BR /&gt;index:&amp;nbsp;license_compliance&lt;/P&gt;&lt;P&gt;fields:&lt;BR /&gt;- prod&amp;nbsp;&lt;/P&gt;&lt;P&gt;- dev&lt;/P&gt;&lt;P&gt;- other (anything that does not end in prod or dev)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=license_compliance OR source="/license_compliance-splunk-data/iCinga_ingest/*"
| rex field=source "\/license_compliance-splunk-data\/iCinga_ingest\/(?&amp;lt;log_source&amp;gt;\w)" 
| eval log_source="iCinga_ingest".log_source 
| stats dc(source)
| dedup source, name
| timechart span=1d count(name) by source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The data looks like this currently:&lt;/P&gt;&lt;P data-unlink="true"&gt;"/license_compliance-splunk-data/iCinga_ingest/iCingaDev_2021-07-07.csv"&lt;/P&gt;&lt;P data-unlink="true"&gt;I would like to get something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;07/07:
iCinga_Prod: 5
iCinga_Dev: 0
iCinga_Other: 2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 14:32:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Group-Different-Sources-in-One-Query/m-p/559433#M6379</guid>
      <dc:creator>a0491455</dc:creator>
      <dc:date>2021-07-14T14:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Group Different Sources in One Query</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Group-Different-Sources-in-One-Query/m-p/559447#M6381</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;dedup&lt;/FONT&gt; command is redundant when &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; is used and &lt;FONT face="courier new,courier"&gt;timechart&lt;/FONT&gt; often (but not always) is redundant to &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt;.&amp;nbsp; Have you tried just &lt;FONT face="courier new,courier"&gt;timechart&lt;/FONT&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=license_compliance OR source="/license_compliance-splunk-data/iCinga_ingest/*"
| rex field=source "\/license_compliance-splunk-data\/iCinga_ingest\/(?&amp;lt;log_source&amp;gt;\w)" 
| eval log_source="iCinga_ingest".log_source 
| timechart span=1d count(name) by log_source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 17:57:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Group-Different-Sources-in-One-Query/m-p/559447#M6381</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-07-14T17:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Group Different Sources in One Query</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Group-Different-Sources-in-One-Query/m-p/559453#M6385</link>
      <description>&lt;P&gt;This unfortunately did not work for me. The code works the same with or without the "rex" command in this case.&lt;/P&gt;&lt;P&gt;My assumption is that the data format (the example I posted was&amp;nbsp;"/license_compliance-splunk-data/iCinga_ingest/iCingaDev_2021-07-07.csv") is not being read and grouped (because it's automated for once every 24hr) by the current query.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 15:53:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Group-Different-Sources-in-One-Query/m-p/559453#M6385</guid>
      <dc:creator>a0491455</dc:creator>
      <dc:date>2021-07-14T15:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Group Different Sources in One Query</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Group-Different-Sources-in-One-Query/m-p/559477#M6391</link>
      <description>&lt;P&gt;Please try my edited answer.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 17:58:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Group-Different-Sources-in-One-Query/m-p/559477#M6391</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-07-14T17:58:09Z</dc:date>
    </item>
  </channel>
</rss>

