<?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 restrict license report to slaves via lookup? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-license-report-to-slaves-via-lookup/m-p/211837#M61958</link>
    <description>&lt;P&gt;Missed removing a bracket. Try the updated answer now.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2016 23:02:25 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-11-04T23:02:25Z</dc:date>
    <item>
      <title>How to restrict license report to slaves via lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-license-report-to-slaves-via-lookup/m-p/211834#M61955</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to run reports against certain slaves reporting into the license manager, and filter them via a lookup.  Here's the existing search - is there a way to filter them via lookup and slave name (not guid) ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*license_usage.log type="RolloverSummary"   | eval _time=_time - 43200 | bin _time span=1d | stats latest(b) AS b by slave, pool, _time | eval slave_guid=slave | stats max(b) AS volume by slave_guid, _time  | join type=outer slave_guid [rest splunk_server=local /services/licenser/slaves | rename label AS slave_name title AS slave_guid | table slave_guid slave_name] | eval slave_name = if(isnotnull(slave_name),slave_name,"GUID: ".slave_guid) | timechart span=1d max(volume) AS "volume" by slave_name fixedrange=false limit=1000| join type=outer _time [search index=_internal source=*license_usage.log type="RolloverSummary" earliest=-30d@d | eval _time=_time - 43200 | bin _time span=1d | stats latest(stacksz) AS "stack size" by _time] | fields - _timediff  | foreach * [eval &amp;lt;&amp;gt;=round('&amp;lt;&amp;gt;'/1024/1024/1024, 3)]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Nov 2016 14:42:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-license-report-to-slaves-via-lookup/m-p/211834#M61955</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2016-11-04T14:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict license report to slaves via lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-license-report-to-slaves-via-lookup/m-p/211835#M61956</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;P&gt;1) Run following search to generate a lookup with all license slaves and corresponding GUID. I would create a scheduled saved search to get this lookup table (say license_slaves.csv) updated daily.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rest splunk_server=local /services/licenser/slaves | rename label AS slave_name title AS slave_guid | table slave_guid slave_name | outputlookup license_slaves.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2) Update your dashboard like this&lt;/P&gt;

&lt;P&gt;a) add the data input (multiselect) to use the lookup&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="multiselect" token="slaves"&amp;gt;
      &amp;lt;label&amp;gt;License Slaves&amp;lt;/label&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All Slaves&amp;lt;/choice&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;| inputlookup license_slaves.csv | table slave_guid slave_name&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;slave_name&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;slave_guid&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;prefix&amp;gt;slave=&amp;lt;/prefix&amp;gt;
      &amp;lt;delimiter&amp;gt; OR slave=&amp;lt;/delimiter&amp;gt;
    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;b) Update you dashboard search like this&lt;BR /&gt;
&lt;STRONG&gt;Updated&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*license_usage.log type="RolloverSummary" $slaves$ | eval _time=_time - 43200 | bin _time span=1d | stats latest(b) AS b by slave, pool, _time | stats max(b) AS volume by slave, _time | lookup license_slaves.csv slave_guid as slave OUTPUT slave_name  | eval slave_name = if(isnotnull(slave_name),slave_name,"GUID: ".slave) | timechart span=1d max(volume) AS "volume" by slave_name fixedrange=false limit=1000| join type=outer _time [search index=_internal source=license_usage.log type="RolloverSummary" earliest=-30d@d | eval _time=_time - 43200 | bin _time span=1d | stats latest(stacksz) AS "stack size" by _time] | fields - _timediff | foreach  * [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=round('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'/1024/1024/1024, 3)]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Nov 2016 15:44:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-license-report-to-slaves-via-lookup/m-p/211835#M61956</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-11-04T15:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict license report to slaves via lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-license-report-to-slaves-via-lookup/m-p/211836#M61957</link>
      <description>&lt;P&gt;Thanks - give me:  Mismatched ']'.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 17:39:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-license-report-to-slaves-via-lookup/m-p/211836#M61957</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2016-11-04T17:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict license report to slaves via lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-license-report-to-slaves-via-lookup/m-p/211837#M61958</link>
      <description>&lt;P&gt;Missed removing a bracket. Try the updated answer now.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 23:02:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-license-report-to-slaves-via-lookup/m-p/211837#M61958</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-11-04T23:02:25Z</dc:date>
    </item>
  </channel>
</rss>

