<?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 Problem getting count(eval(. . .  from chart command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Problem-getting-count-eval-from-chart-command/m-p/101007#M26100</link>
    <description>&lt;P&gt;Trying to emulate &lt;A href="http://www.splunk.com/base/Documentation/4.1.6/SearchReference/Chart#Example_1" rel="nofollow"&gt;example given here&lt;/A&gt;, but totals always come up zero. Basic search returns over 1,000 events for a 4 hour period, containing 4 eventcodes: 636, 637, 4732, 4733.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"ConfigMgr Remote" |chart count(Eval(EventCode="636")) AS Added, count(Eval(EventCode="637")) AS Removed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk GUI returns: Specified field(s) missing from results: 'Eval(EventCode=636)', 'Eval(EventCode=637)'   &lt;/P&gt;

&lt;P&gt;Have also tried if, case, and like functions of eval (with &amp;amp; without quoted aurguments):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"ConfigMgr Remote" |chart count(Eval(If EventCode == "636", "1", "0")) AS Added, count(Eval(Case EventCode == "637", 1, EventCode == 4733, 1)) AS Removed, count(Eval(like, Message, "%removed%")) AS Removed2 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/questions/2295/how-come-some-fields-disappear-when-they-go-into-timechart-chart" rel="nofollow"&gt;Answer here&lt;/A&gt; looks promising, but can't get bin and stats to work either.   &lt;/P&gt;

&lt;P&gt;Final goal, after I get the basic chart to work, is to change to timechart:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"ConfigMgr Remote" |timechart count(Eval(EventCode="636" OR EventCode="4732")) AS Added, count(Eval(EventCode="637" OR EventCode="4733")) AS Removed
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 08 Dec 2010 06:01:09 GMT</pubDate>
    <dc:creator>rgcox1</dc:creator>
    <dc:date>2010-12-08T06:01:09Z</dc:date>
    <item>
      <title>Problem getting count(eval(. . .  from chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-getting-count-eval-from-chart-command/m-p/101007#M26100</link>
      <description>&lt;P&gt;Trying to emulate &lt;A href="http://www.splunk.com/base/Documentation/4.1.6/SearchReference/Chart#Example_1" rel="nofollow"&gt;example given here&lt;/A&gt;, but totals always come up zero. Basic search returns over 1,000 events for a 4 hour period, containing 4 eventcodes: 636, 637, 4732, 4733.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"ConfigMgr Remote" |chart count(Eval(EventCode="636")) AS Added, count(Eval(EventCode="637")) AS Removed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk GUI returns: Specified field(s) missing from results: 'Eval(EventCode=636)', 'Eval(EventCode=637)'   &lt;/P&gt;

&lt;P&gt;Have also tried if, case, and like functions of eval (with &amp;amp; without quoted aurguments):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"ConfigMgr Remote" |chart count(Eval(If EventCode == "636", "1", "0")) AS Added, count(Eval(Case EventCode == "637", 1, EventCode == 4733, 1)) AS Removed, count(Eval(like, Message, "%removed%")) AS Removed2 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/questions/2295/how-come-some-fields-disappear-when-they-go-into-timechart-chart" rel="nofollow"&gt;Answer here&lt;/A&gt; looks promising, but can't get bin and stats to work either.   &lt;/P&gt;

&lt;P&gt;Final goal, after I get the basic chart to work, is to change to timechart:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"ConfigMgr Remote" |timechart count(Eval(EventCode="636" OR EventCode="4732")) AS Added, count(Eval(EventCode="637" OR EventCode="4733")) AS Removed
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Dec 2010 06:01:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-getting-count-eval-from-chart-command/m-p/101007#M26100</guid>
      <dc:creator>rgcox1</dc:creator>
      <dc:date>2010-12-08T06:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem getting count(eval(. . .  from chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-getting-count-eval-from-chart-command/m-p/101008#M26101</link>
      <description>&lt;P&gt;&lt;CODE&gt;eval()&lt;/CODE&gt; needs to be written with a lower-case &lt;CODE&gt;e&lt;/CODE&gt;, not upper-case &lt;CODE&gt;E&lt;/CODE&gt;. I believe the same is true of &lt;CODE&gt;if()&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2010 15:10:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-getting-count-eval-from-chart-command/m-p/101008#M26101</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-12-08T15:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem getting count(eval(. . .  from chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-getting-count-eval-from-chart-command/m-p/101009#M26102</link>
      <description>&lt;P&gt;Thanks - one day maybe I'll get used to the case sensitivity almost everywhere!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2010 00:16:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-getting-count-eval-from-chart-command/m-p/101009#M26102</guid>
      <dc:creator>rgcox1</dc:creator>
      <dc:date>2010-12-09T00:16:28Z</dc:date>
    </item>
  </channel>
</rss>

