<?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 stats for two different field logs coming from the same device by using the OR command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315946#M94557</link>
    <description>&lt;P&gt;Thanks!!!!&lt;/P&gt;</description>
    <pubDate>Fri, 06 Apr 2018 13:21:13 GMT</pubDate>
    <dc:creator>aqudoos</dc:creator>
    <dc:date>2018-04-06T13:21:13Z</dc:date>
    <item>
      <title>How to count stats for two different field logs coming from the same device by using the OR command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315943#M94554</link>
      <description>&lt;P&gt;I have two different fields in logs coming from the same device. I want to count that stats for both fields by using the OR command but it's not running.&lt;/P&gt;

&lt;P&gt;Following is the command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|stats count by (Source-IP OR source_ip ) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Source-ip and source_ip are two different fields&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 11:20:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315943#M94554</guid>
      <dc:creator>aqudoos</dc:creator>
      <dc:date>2018-04-06T11:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to count stats for two different field logs coming from the same device by using the OR command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315944#M94555</link>
      <description>&lt;P&gt;Rename one of the fields to match the name of the other, before doing the stats, so for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rename Source-IP AS source_ip
| stats count by source_ip
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Apr 2018 13:00:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315944#M94555</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-04-06T13:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to count stats for two different field logs coming from the same device by using the OR command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315945#M94556</link>
      <description>&lt;P&gt;One can't use &lt;CODE&gt;OR&lt;/CODE&gt; in that context.  Use a separate &lt;CODE&gt;eval&lt;/CODE&gt; to establish the &lt;CODE&gt;by&lt;/CODE&gt; field.  For example,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval src_ip = coalesce(Source-IP, source_IP) | stats count by src_ip
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Apr 2018 13:08:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315945#M94556</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-04-06T13:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to count stats for two different field logs coming from the same device by using the OR command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315946#M94557</link>
      <description>&lt;P&gt;Thanks!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 13:21:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315946#M94557</guid>
      <dc:creator>aqudoos</dc:creator>
      <dc:date>2018-04-06T13:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to count stats for two different field logs coming from the same device by using the OR command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315947#M94558</link>
      <description>&lt;P&gt;Thanks!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 13:21:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315947#M94558</guid>
      <dc:creator>aqudoos</dc:creator>
      <dc:date>2018-04-06T13:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to count stats for two different field logs coming from the same device by using the OR command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315948#M94559</link>
      <description>&lt;P&gt;Also you can get by segregating the data only from those two sources &lt;/P&gt;

&lt;P&gt;index=* source=a OR source=b&lt;BR /&gt;
|stats count by source&lt;/P&gt;</description>
      <pubDate>Sat, 07 Apr 2018 10:36:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315948#M94559</guid>
      <dc:creator>krishnab</dc:creator>
      <dc:date>2018-04-07T10:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to count stats for two different field logs coming from the same device by using the OR command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315949#M94560</link>
      <description>&lt;P&gt;I downvoted this post because he wants to count by source_ip field. splunk's 'source' metadata field has nothing to do with that.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 07:44:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-stats-for-two-different-field-logs-coming-from-the/m-p/315949#M94560</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-04-09T07:44:59Z</dc:date>
    </item>
  </channel>
</rss>

