<?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 How to create a conditional search if license usage is above 80%, then show top 10 hosts? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-conditional-search-if-license-usage-is-above-80/m-p/346576#M102644</link>
    <description>&lt;P&gt;There is default license alert when license usage is greater 80%, then you will get email notification.  The alert is like&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;" | rest splunk_server=local /services/licenser/pools | rename title AS Pool | search [rest splunk_server=local /services/licenser/groups | search is_active=1 | eval stack_id=stack_ids | fields stack_id] | eval quota=if(isnull(effective_quota),quota,effective_quota) | eval "% used"=round(used_bytes/quota*100,2) | fields Pool "% used" | where '% used' &amp;gt; 80 "&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Is there possible to create another alert that if the license usage is greater 80%, then sent the alert along with the top 10 usage hosts?&lt;/P&gt;

&lt;P&gt;it's like the conditional search. &lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 14:27:50 GMT</pubDate>
    <dc:creator>fli</dc:creator>
    <dc:date>2020-09-29T14:27:50Z</dc:date>
    <item>
      <title>How to create a conditional search if license usage is above 80%, then show top 10 hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-conditional-search-if-license-usage-is-above-80/m-p/346576#M102644</link>
      <description>&lt;P&gt;There is default license alert when license usage is greater 80%, then you will get email notification.  The alert is like&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;" | rest splunk_server=local /services/licenser/pools | rename title AS Pool | search [rest splunk_server=local /services/licenser/groups | search is_active=1 | eval stack_id=stack_ids | fields stack_id] | eval quota=if(isnull(effective_quota),quota,effective_quota) | eval "% used"=round(used_bytes/quota*100,2) | fields Pool "% used" | where '% used' &amp;gt; 80 "&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Is there possible to create another alert that if the license usage is greater 80%, then sent the alert along with the top 10 usage hosts?&lt;/P&gt;

&lt;P&gt;it's like the conditional search. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:27:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-conditional-search-if-license-usage-is-above-80/m-p/346576#M102644</guid>
      <dc:creator>fli</dc:creator>
      <dc:date>2020-09-29T14:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a conditional search if license usage is above 80%, then show top 10 hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-conditional-search-if-license-usage-is-above-80/m-p/346577#M102645</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest splunk_server=local /services/licenser/pools | rename title AS Pool | search [rest splunk_server=local /services/licenser/groups | search is_active=1 | eval stack_id=stack_ids | fields stack_id] | eval quota=if(isnull(effective_quota),quota,effective_quota) | eval "% used"=round(used_bytes/quota*100,2) | fields Pool "% used" | where '% used' &amp;gt; 80 | map search="search index=_internal sourcetype=splunkd source=*license_usage.log type=Usage earliest=@d | stats sum(b) as usage by h | eval usage=round(usage/1024/1024/1024,3) | sort 10 -usage"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Jun 2017 21:01:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-conditional-search-if-license-usage-is-above-80/m-p/346577#M102645</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-14T21:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a conditional search if license usage is above 80%, then show top 10 hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-conditional-search-if-license-usage-is-above-80/m-p/346578#M102646</link>
      <description>&lt;P&gt;@somesoni2 -  I'm thinking that the original search could result in multiple records (one for each licenser pool above 80% usage with an active stack_id).   Any way to pull top 10 usage hosts in each Pool?   &lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2017 01:54:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-conditional-search-if-license-usage-is-above-80/m-p/346578#M102646</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-15T01:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a conditional search if license usage is above 80%, then show top 10 hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-conditional-search-if-license-usage-is-above-80/m-p/346579#M102647</link>
      <description>&lt;P&gt;thanks somesoni2, it works!!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2017 13:30:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-conditional-search-if-license-usage-is-above-80/m-p/346579#M102647</guid>
      <dc:creator>fli</dc:creator>
      <dc:date>2017-06-15T13:30:54Z</dc:date>
    </item>
  </channel>
</rss>

