<?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 Weight host using lookup table. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Weight-host-using-lookup-table/m-p/94662#M24446</link>
    <description>&lt;P&gt;I'm trying to get a weighted ratio of errors per server. I have a lookup table like this:&lt;/P&gt;

&lt;P&gt;host,percent&lt;BR /&gt;
server1,25&lt;BR /&gt;
server2,25&lt;BR /&gt;
server3,50&lt;/P&gt;

&lt;P&gt;Normally I'd do something like &lt;CODE&gt;sourcetype=iis sc_status=500 [| inputlookup ratio | fields host] | chart count by host&lt;/CODE&gt;, which gives me a count of errors by server, but I want a weighted count based on that percent.&lt;/P&gt;

&lt;P&gt;How would I use the lookup table to multiply the errors on a per server basis?&lt;/P&gt;</description>
    <pubDate>Mon, 15 Apr 2013 18:09:03 GMT</pubDate>
    <dc:creator>jevenson</dc:creator>
    <dc:date>2013-04-15T18:09:03Z</dc:date>
    <item>
      <title>Weight host using lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Weight-host-using-lookup-table/m-p/94662#M24446</link>
      <description>&lt;P&gt;I'm trying to get a weighted ratio of errors per server. I have a lookup table like this:&lt;/P&gt;

&lt;P&gt;host,percent&lt;BR /&gt;
server1,25&lt;BR /&gt;
server2,25&lt;BR /&gt;
server3,50&lt;/P&gt;

&lt;P&gt;Normally I'd do something like &lt;CODE&gt;sourcetype=iis sc_status=500 [| inputlookup ratio | fields host] | chart count by host&lt;/CODE&gt;, which gives me a count of errors by server, but I want a weighted count based on that percent.&lt;/P&gt;

&lt;P&gt;How would I use the lookup table to multiply the errors on a per server basis?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2013 18:09:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Weight-host-using-lookup-table/m-p/94662#M24446</guid>
      <dc:creator>jevenson</dc:creator>
      <dc:date>2013-04-15T18:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Weight host using lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Weight-host-using-lookup-table/m-p/94663#M24447</link>
      <description>&lt;P&gt;Hi! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;So, if what you want to do it multiply the count by the defined percent value for each of these hosts, you could do something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=iis sc_status=500 [| inputlookup ratio | fields host] | lookup yourlookuptable host OUTPUT percent | chart count by host | eval weightedcount=count*percent/100
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Apr 2013 18:25:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Weight-host-using-lookup-table/m-p/94663#M24447</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-04-15T18:25:58Z</dc:date>
    </item>
  </channel>
</rss>

