<?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: Why are two different queries that return license usage by host  getting different results (with several hosts missing)? in Security</title>
    <link>https://community.splunk.com/t5/Security/Why-are-two-different-queries-that-return-license-usage-by-host/m-p/424769#M13358</link>
    <description>&lt;P&gt;It might not be possible from the metrics log because if you have a lot of hosts/sources/sourcetypes, they will be squashed and summarised. It does this to stop the metrics log from becoming huge.&lt;/P&gt;

&lt;P&gt;You could run a search like this instead, however it is going to be very slow:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=whatever | eval len = len(_raw) | stats sum(len) by host&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;That will tell you the answer in bytes.&lt;/P&gt;</description>
    <pubDate>Sat, 26 Jan 2019 09:28:48 GMT</pubDate>
    <dc:creator>chrisyounger</dc:creator>
    <dc:date>2019-01-26T09:28:48Z</dc:date>
    <item>
      <title>Why are two different queries that return license usage by host  getting different results (with several hosts missing)?</title>
      <link>https://community.splunk.com/t5/Security/Why-are-two-different-queries-that-return-license-usage-by-host/m-p/424768#M13357</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to determine total license usage in GB by a certain group of assets where hostname starts with "xyz". There are a total of 24 such hosts that are currently sending data in Splunk, but I tried two different searches to get license count and both reported a different number of hosts.&lt;/P&gt;

&lt;P&gt;Following query gave results for 10 hosts. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal host=&amp;lt;License Master&amp;gt; source=*license_usage.log* type="Usage" h=xyz* | eval s=if(len(s)=0 OR isnull(s),"(SQUASHED)",s) | eval idx=if(len(idx)=0 OR isnull(idx),"(UNKNOWN)",idx) | bin _time span=1d | stats sum(b) as b by _time, pool, s, st, h, idx | eval b=b/(1024*1024*1024)  | timechart span=1d sum(b) AS volumeB by h fixedrange=false useother=f
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Whereas the following gave data only for 7 of them.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*metrics.log group="tcpin_connections" hostname=xyz*   | eval sourceHost=if(isnull(hostname), sourceHost,hostname) | stats sum(kb) as KB by sourceHost | eval KB = round(KB)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;We have just one license master and both queries above were run for a 24 Hour window. How can I get the total sum of data sent by these hosts(xyz*) in the last 24 hours? &lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;~ Abhi&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 15:55:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Why-are-two-different-queries-that-return-license-usage-by-host/m-p/424768#M13357</guid>
      <dc:creator>att35</dc:creator>
      <dc:date>2019-01-25T15:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why are two different queries that return license usage by host  getting different results (with several hosts missing)?</title>
      <link>https://community.splunk.com/t5/Security/Why-are-two-different-queries-that-return-license-usage-by-host/m-p/424769#M13358</link>
      <description>&lt;P&gt;It might not be possible from the metrics log because if you have a lot of hosts/sources/sourcetypes, they will be squashed and summarised. It does this to stop the metrics log from becoming huge.&lt;/P&gt;

&lt;P&gt;You could run a search like this instead, however it is going to be very slow:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=whatever | eval len = len(_raw) | stats sum(len) by host&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;That will tell you the answer in bytes.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jan 2019 09:28:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Why-are-two-different-queries-that-return-license-usage-by-host/m-p/424769#M13358</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-01-26T09:28:48Z</dc:date>
    </item>
  </channel>
</rss>

