<?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: Splunk Calculated fields in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Splunk-Calculated-fields/m-p/208289#M1855</link>
    <description>&lt;P&gt;The &lt;CODE&gt;Apply to&lt;/CODE&gt; selection gives the context/scope of the new field.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;Name&lt;/CODE&gt; can be  ClusterName.&lt;/P&gt;

&lt;P&gt;The Eval expression can be - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;case(

 host == "host1", "ClusterA", 
 host == "host2", "ClusterA",
 host == "host3", "ClusterA",

.... to add the rest 

 host == "host11", "ClusterB", 
 host == "host12", "ClusterB",
 host == "host13", "ClusterB",

.... to add the rest 
)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;By doing that you end up with a new field called &lt;CODE&gt;ClusterName&lt;/CODE&gt; which would have  either &lt;CODE&gt;ClusterA&lt;/CODE&gt; or &lt;CODE&gt;ClusterB&lt;/CODE&gt; as its value.&lt;/P&gt;</description>
    <pubDate>Sun, 25 Sep 2016 15:38:20 GMT</pubDate>
    <dc:creator>ddrillic</dc:creator>
    <dc:date>2016-09-25T15:38:20Z</dc:date>
    <item>
      <title>Splunk Calculated fields</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Splunk-Calculated-fields/m-p/208287#M1853</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I may be looking in the wrong place, but I am not able to find out information on how to use a few calculated fields.&lt;/P&gt;

&lt;P&gt;I have a requirement like this,&lt;/P&gt;

&lt;P&gt;If host = "host 1 or host 2 or host 3 . . . . . host10" -&amp;gt; mark clusterName as ClusterA&lt;BR /&gt;
If host = "host 11 or host 12 or host 13 . . . . . host20" -&amp;gt; mark clusterName as ClusterB&lt;/P&gt;

&lt;P&gt;I have attached the screenshot of the page to create calculated fields.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1889i3A9D77D3DF8AF860/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Is the below info correct?&lt;BR /&gt;
Destination app - My custom app&lt;BR /&gt;
Apply to - Host&lt;BR /&gt;
named ---- WHAT SHOULD I GIVE???&lt;BR /&gt;
Name-clusterName&lt;BR /&gt;
Eval expression - host 1 or host 2 or host 3 . . . . . host10&lt;/P&gt;

&lt;P&gt;Kindly help me out.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Sep 2016 06:37:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Splunk-Calculated-fields/m-p/208287#M1853</guid>
      <dc:creator>namritha</dc:creator>
      <dc:date>2016-09-25T06:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Calculated fields</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Splunk-Calculated-fields/m-p/208288#M1854</link>
      <description>&lt;P&gt;Here is a corrected answer....&lt;BR /&gt;
In this case where you want to evaluate all hosts, then named would be *&lt;BR /&gt;
    Apply to =  Host&lt;BR /&gt;
    Named = *&lt;BR /&gt;
    Name = your name for the resultant group&lt;BR /&gt;
    Eval expression = the expression that isolates the group&lt;/P&gt;</description>
      <pubDate>Sun, 25 Sep 2016 12:59:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Splunk-Calculated-fields/m-p/208288#M1854</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2016-09-25T12:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Calculated fields</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Splunk-Calculated-fields/m-p/208289#M1855</link>
      <description>&lt;P&gt;The &lt;CODE&gt;Apply to&lt;/CODE&gt; selection gives the context/scope of the new field.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;Name&lt;/CODE&gt; can be  ClusterName.&lt;/P&gt;

&lt;P&gt;The Eval expression can be - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;case(

 host == "host1", "ClusterA", 
 host == "host2", "ClusterA",
 host == "host3", "ClusterA",

.... to add the rest 

 host == "host11", "ClusterB", 
 host == "host12", "ClusterB",
 host == "host13", "ClusterB",

.... to add the rest 
)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;By doing that you end up with a new field called &lt;CODE&gt;ClusterName&lt;/CODE&gt; which would have  either &lt;CODE&gt;ClusterA&lt;/CODE&gt; or &lt;CODE&gt;ClusterB&lt;/CODE&gt; as its value.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Sep 2016 15:38:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Splunk-Calculated-fields/m-p/208289#M1855</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-09-25T15:38:20Z</dc:date>
    </item>
  </channel>
</rss>

