<?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: Convert numbers to string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Convert-numbers-to-string/m-p/73071#M18284</link>
    <description>&lt;P&gt;hmmm.. i can use the eval to get the two desired values, i haven't actually tried it. &lt;BR /&gt;
thanks Martin&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2013 08:46:20 GMT</pubDate>
    <dc:creator>chamil3001</dc:creator>
    <dc:date>2013-03-25T08:46:20Z</dc:date>
    <item>
      <title>Convert numbers to string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-numbers-to-string/m-p/73069#M18282</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;My search formula returns a value in number. I want to check that number and if the number is below 50 a Word should be displayed as "Okay" and if not (number&amp;gt;50) word should be displayed as "Check".&lt;/P&gt;

&lt;P&gt;heres my fomula&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;host="HOST01" source=WMI:memory OR source="WMI:CPUTime" OR sourcetype="WMI:FreeDiskSpace" NOT Name=_Total | stats max(AvailableMBytes) as maxAvailableMBytes max(PercentProcessorTime) as maxPercentProcessorTime max(PercentFreeSpace) as maxPercentFreeSpace | eval maxUsedRAM = round(((4096-maxAvailableMBytes)*100)/4096, 0) | eval maxUsedSpace = round(100-maxPercentFreeSpace, 0) | eval intMax = if(if(maxUsedRAM&amp;gt;maxPercentProcessorTime,maxUsedRAM,maxPercentProcessorTime)&amp;gt;maxPercentFreeSpace, if(maxUsedRAM&amp;gt;maxPercentProcessorTime, maxUsedRAM, maxPercentProcessorTime),maxPercentFreeSpace) | table intMax&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;

&lt;P&gt;Chamil&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2013 06:01:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-numbers-to-string/m-p/73069#M18282</guid>
      <dc:creator>chamil3001</dc:creator>
      <dc:date>2013-03-25T06:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Convert numbers to string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-numbers-to-string/m-p/73070#M18283</link>
      <description>&lt;P&gt;A more general note - if you're looking for the maximum of free space or memory you cannot deduct this from the total to get the maximum used space or memory. You'd have to look for the minimum free to get the maximum used.&lt;/P&gt;

&lt;P&gt;As for finding the maximum of three fields, you can use the eval function max() instead of a cascaded if.&lt;/P&gt;

&lt;P&gt;Concerning your actual question, what's wrong with eval result = if(value &amp;lt; 50, "Okay", "Check")?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2013 08:19:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-numbers-to-string/m-p/73070#M18283</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-03-25T08:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Convert numbers to string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-numbers-to-string/m-p/73071#M18284</link>
      <description>&lt;P&gt;hmmm.. i can use the eval to get the two desired values, i haven't actually tried it. &lt;BR /&gt;
thanks Martin&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2013 08:46:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-numbers-to-string/m-p/73071#M18284</guid>
      <dc:creator>chamil3001</dc:creator>
      <dc:date>2013-03-25T08:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Convert numbers to string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-numbers-to-string/m-p/73072#M18285</link>
      <description>&lt;P&gt;Yup.. got it to work. Thanks Martin,&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2013 03:09:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-numbers-to-string/m-p/73072#M18285</guid>
      <dc:creator>chamil3001</dc:creator>
      <dc:date>2013-03-26T03:09:16Z</dc:date>
    </item>
  </channel>
</rss>

