<?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: Question on basic subtraction in time charts in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37738#M8506</link>
    <description>&lt;P&gt;I think so. Get this error&lt;/P&gt;

&lt;P&gt;Error in 'timechart' command: The specifier 'eval' is invalid. It must be in form &lt;FUNC&gt;(&lt;FIELD&gt;). For example: max(size).&lt;/FIELD&gt;&lt;/FUNC&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jul 2011 16:32:12 GMT</pubDate>
    <dc:creator>clintla</dc:creator>
    <dc:date>2011-07-05T16:32:12Z</dc:date>
    <item>
      <title>Question on basic subtraction in time charts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37736#M8504</link>
      <description>&lt;P&gt;Per below- my Total Configured_Space &amp;amp; Free_Space work great.&lt;/P&gt;

&lt;P&gt;timechart eval(sum(Logical_Capacity_&lt;EM&gt;Blocks&lt;/EM&gt;) / 2097152000) as Configured_Space,eval(sum(Free_contiguous_group_of_unbound_segments) / 2097152000) as Free_Space, &lt;STRONG&gt;eval(Configured_Space - Free_Space)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Now I'd like to have a listing of consumed space in my chart which means I really need&lt;BR /&gt;
to subtract Free_Space from Configured_Space &amp;amp; I've tried several variations which &lt;BR /&gt;
dont really work. &lt;BR /&gt;
keep getting &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Error in 'timechart' command: The eval expression has no fields: 'WDC_Configured_Space - Free_Space'&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I've found the doc's page &amp;amp; it never really comes out &amp;amp; says how to subtract. &lt;BR /&gt;
&lt;A href="http://www.splunk.com/base/Documentation/4.2.1/SearchReference/Eval" target="_blank"&gt;http://www.splunk.com/base/Documentation/4.2.1/SearchReference/Eval&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;What is the correct syntax to do subtraction?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:42:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37736#M8504</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2020-09-28T09:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Question on basic subtraction in time charts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37737#M8505</link>
      <description>&lt;P&gt;Hi clintla&lt;/P&gt;

&lt;P&gt;have you tried the following eval?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval consumed_space = Configured_Space - Free_Space
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;regrads&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2011 06:32:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37737#M8505</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2011-07-04T06:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Question on basic subtraction in time charts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37738#M8506</link>
      <description>&lt;P&gt;I think so. Get this error&lt;/P&gt;

&lt;P&gt;Error in 'timechart' command: The specifier 'eval' is invalid. It must be in form &lt;FUNC&gt;(&lt;FIELD&gt;). For example: max(size).&lt;/FIELD&gt;&lt;/FUNC&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2011 16:32:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37738#M8506</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2011-07-05T16:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Question on basic subtraction in time charts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37739#M8507</link>
      <description>&lt;P&gt;Hi Clintla&lt;/P&gt;

&lt;P&gt;well I can fire up your command like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;* | timechart eval(sum(Logical_Capacity_Blocks_) / 2097152000) as Configured_Space, eval(sum(Free_contiguous_group_of_unbound_segments) / 2097152000) as Free_Space | eval consumed_space = Configured_Space - Free_Space&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;it runs without any error and brings up an result.&lt;/P&gt;

&lt;P&gt;cheers&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2011 04:54:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37739#M8507</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2011-07-06T04:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Question on basic subtraction in time charts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37740#M8508</link>
      <description>&lt;P&gt;Thanks, That works... I feel like I got what I asked for &amp;amp; not what I wanted. I used a , instead of a pipe. &lt;/P&gt;

&lt;P&gt;Not really sure why there is not more documentation on&lt;BR /&gt;
Do's &amp;amp; donts. &lt;/P&gt;

&lt;P&gt;I'd like to have a graph of used/free space but the above&lt;BR /&gt;
throws in total space which messes up the graph. &lt;/P&gt;

&lt;P&gt;try things like&lt;BR /&gt;
source="&lt;EM&gt;OSDC&lt;/EM&gt;" | timechart eval(sum(Free_contiguous_group_of_unbound_segments) / 2097152000) as Free_Space | eval Consumed_space = eval(sum(Logical_Capacity_&lt;EM&gt;Blocks&lt;/EM&gt;) / 2097152000) - Free_Space&lt;/P&gt;

&lt;P&gt;&amp;amp; it tells me SUM is not supported. puzzling.&lt;/P&gt;

&lt;P&gt;other tries- says no fields. &lt;/P&gt;

&lt;P&gt;I'll try some more.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:43:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37740#M8508</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2020-09-28T09:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Question on basic subtraction in time charts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37741#M8509</link>
      <description>&lt;P&gt;hi i also got the same error&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2012 10:39:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-basic-subtraction-in-time-charts/m-p/37741#M8509</guid>
      <dc:creator>splunkpoornima</dc:creator>
      <dc:date>2012-10-16T10:39:01Z</dc:date>
    </item>
  </channel>
</rss>

