<?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: We want to get license usage by a _meta field ServerRole? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/We-want-to-get-license-usage-by-a-meta-field-ServerRole/m-p/357104#M166469</link>
    <description>&lt;P&gt;For getting license usage of a specific index I would recommend using the license_usage.log in the _internal index. Here is a recommended search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*license_usage.log type="Usage"    | eval indexname = if(len(idx)=0 OR isnull(idx),"(UNKNOWN)",idx)   | eval sourcetypename = st   | stats sum(b) as b by _time, indexname, sourcetypename | eval GB=(b/1024/1024/1024)  | fields _time, indexname, sourcetypename, GB | search indexname=* sourcetypename=* | stats sum(GB)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can change the filters to hit specific sourcetypes or indexes. You can add host/source metadata to the search but those values run the risk of being squashed in license_usage.log and may not be present in every event. The reason h or s may not be present in all events is described well here: &lt;A href="https://answers.splunk.com/answers/48542/blank-h-and-s-in-license-usage-log.html"&gt;https://answers.splunk.com/answers/48542/blank-h-and-s-in-license-usage-log.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2017 19:29:23 GMT</pubDate>
    <dc:creator>mdsnmss</dc:creator>
    <dc:date>2017-08-11T19:29:23Z</dc:date>
    <item>
      <title>We want to get license usage by a _meta field ServerRole?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/We-want-to-get-license-usage-by-a-meta-field-ServerRole/m-p/357102#M166467</link>
      <description>&lt;P&gt;The license usage logs are present under an index ABC, but in inputs.conf in which the _meta field is present sends data to different index winsec.&lt;/P&gt;

&lt;P&gt;Will the below query provide the exact license usage?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index=winsec | eval b=len(_raw) |eval GB=(b/(1024*1024*1024)) | stats sum(GB)&lt;/STRONG&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:16:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/We-want-to-get-license-usage-by-a-meta-field-ServerRole/m-p/357102#M166467</guid>
      <dc:creator>Arpit_S</dc:creator>
      <dc:date>2020-09-29T15:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: We want to get license usage by a _meta field ServerRole?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/We-want-to-get-license-usage-by-a-meta-field-ServerRole/m-p/357103#M166468</link>
      <description>&lt;P&gt;this will look at the length of the raw data in winsec index&lt;BR /&gt;
if all your data goes only to that index (not the internal splunk data) than it will be pretty accurate.&lt;BR /&gt;
will highly recommend to go back to default and use the license master correctly&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 12:55:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/We-want-to-get-license-usage-by-a-meta-field-ServerRole/m-p/357103#M166468</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-08-10T12:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: We want to get license usage by a _meta field ServerRole?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/We-want-to-get-license-usage-by-a-meta-field-ServerRole/m-p/357104#M166469</link>
      <description>&lt;P&gt;For getting license usage of a specific index I would recommend using the license_usage.log in the _internal index. Here is a recommended search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*license_usage.log type="Usage"    | eval indexname = if(len(idx)=0 OR isnull(idx),"(UNKNOWN)",idx)   | eval sourcetypename = st   | stats sum(b) as b by _time, indexname, sourcetypename | eval GB=(b/1024/1024/1024)  | fields _time, indexname, sourcetypename, GB | search indexname=* sourcetypename=* | stats sum(GB)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can change the filters to hit specific sourcetypes or indexes. You can add host/source metadata to the search but those values run the risk of being squashed in license_usage.log and may not be present in every event. The reason h or s may not be present in all events is described well here: &lt;A href="https://answers.splunk.com/answers/48542/blank-h-and-s-in-license-usage-log.html"&gt;https://answers.splunk.com/answers/48542/blank-h-and-s-in-license-usage-log.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 19:29:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/We-want-to-get-license-usage-by-a-meta-field-ServerRole/m-p/357104#M166469</guid>
      <dc:creator>mdsnmss</dc:creator>
      <dc:date>2017-08-11T19:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: We want to get license usage by a _meta field ServerRole?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/We-want-to-get-license-usage-by-a-meta-field-ServerRole/m-p/357105#M166470</link>
      <description>&lt;P&gt;The above query will only work and provide license usage using _internal index. But the input is coming to different indexes.&lt;/P&gt;

&lt;P&gt;But, we need to group the hosts by the _meta field and find the license usage of each group. Is it possible to calculate license usage using the _meta field added to every host in the configuration?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 09:28:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/We-want-to-get-license-usage-by-a-meta-field-ServerRole/m-p/357105#M166470</guid>
      <dc:creator>Arpit_S</dc:creator>
      <dc:date>2017-08-16T09:28:34Z</dc:date>
    </item>
  </channel>
</rss>

