<?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: Trying chart of multiple data series wtih tutoriel but error with eval in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130774#M35639</link>
    <description>&lt;P&gt;Here you go: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="" sourcetype="" | 
stats count(eval(CPU="0")) as 0_CPU avg(CPU) as avg_CPU by _time Serveur | 
eval s1="CPU_0 avgCPU" | 
makemv s1 | mvexpand s1| 
eval yval=case(s1=="CPU_0",0_CPU,s1=="avgCPU",avg_CPU) | 
eval series=Serveur+":"+s1 | xyseries _time series yval
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 29 May 2015 09:50:00 GMT</pubDate>
    <dc:creator>stephanefotso</dc:creator>
    <dc:date>2015-05-29T09:50:00Z</dc:date>
    <item>
      <title>Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130771#M35636</link>
      <description>&lt;P&gt;I am tring to run a chart report followting the exemple from Search manual p.71, I get a field named "Serveur" &lt;BR /&gt;
index="&lt;EM&gt;" sourcetype="&lt;/EM&gt;" | &lt;BR /&gt;
  stats count(CPU=0) as 0_CPU avg(CPU) as avg_CPU by _time Serveur | &lt;BR /&gt;
  eval s1="CPU_0 avgCPU" | &lt;BR /&gt;
  makemv s1 | mvexpand s1| &lt;BR /&gt;
  &lt;STRONG&gt;eval yval=case(s1=="CPU_0",0_CPU,s1=="avgCPU",avg_CPU) |&lt;/STRONG&gt; &lt;BR /&gt;
  eval series=Serveur+":"s1 | xyseries _time series yval&lt;/P&gt;

&lt;P&gt;but there is an error with that eval in black, it shows "Error in 'eval' command: The expression is malformed. Expected )", but I just can't find where I missed the ")". Thanks for helping me.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:06:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130771#M35636</guid>
      <dc:creator>echozero39</dc:creator>
      <dc:date>2020-09-28T20:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130772#M35637</link>
      <description>&lt;P&gt;Hello!n I think the error is here: &lt;CODE&gt;eval series=Serveur+":"s1&lt;/CODE&gt;. Here is what to write: &lt;CODE&gt;eval series=Serveur+":"+s1&lt;/CODE&gt;&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 09:03:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130772#M35637</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-29T09:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130773#M35638</link>
      <description>&lt;P&gt;Thanks for your answer, that was a mistake occurred when I typed the question&lt;BR /&gt;
The problem is the eval in black anyway, &lt;/P&gt;

&lt;P&gt;in fact I did test without the last line and it gave me always:&lt;/P&gt;

&lt;P&gt;Error in 'eval' command: The expression is malformed. Expected ). &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 09:11:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130773#M35638</guid>
      <dc:creator>echozero39</dc:creator>
      <dc:date>2015-05-29T09:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130774#M35639</link>
      <description>&lt;P&gt;Here you go: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="" sourcetype="" | 
stats count(eval(CPU="0")) as 0_CPU avg(CPU) as avg_CPU by _time Serveur | 
eval s1="CPU_0 avgCPU" | 
makemv s1 | mvexpand s1| 
eval yval=case(s1=="CPU_0",0_CPU,s1=="avgCPU",avg_CPU) | 
eval series=Serveur+":"+s1 | xyseries _time series yval
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 May 2015 09:50:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130774#M35639</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-29T09:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130775#M35640</link>
      <description>&lt;P&gt;Thanks again !&lt;BR /&gt;
But It doesn't work, always the same error. &lt;/P&gt;

&lt;P&gt;this eval make the whole command goes wrong : eval yval=case(s1=="CPU_0",0_CPU,s1=="avgCPU",avg_CPU&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:06:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130775#M35640</guid>
      <dc:creator>echozero39</dc:creator>
      <dc:date>2020-09-28T20:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130776#M35641</link>
      <description>&lt;P&gt;You forgot to enclose them with double quote :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval yval=case(s1="CPU_0","0_CPU",s1="avgCPU","avg_CPU")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 May 2015 12:28:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130776#M35641</guid>
      <dc:creator>hmozaffari</dc:creator>
      <dc:date>2015-05-29T12:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130777#M35642</link>
      <description>&lt;P&gt;That's a copy/paste issue..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="" sourcetype="" | 
 stats count(eval(CPU="0")) as 0_CPU avg(CPU) as avg_CPU by _time Serveur | 
 eval s1="CPU_0 avgCPU" | 
 makemv s1 | mvexpand s1| 
 eval yval=case(s1=="CPU_0",0_CPU,s1=="avgCPU",avg_CPU) | 
 eval series=Serveur+":"+s1 | xyseries _time series yval
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="" sourcetype="" | 
 stats count(CPU=0) as 0_CPU avg(CPU) as avg_CPU by _time Serveur | 
 eval s1="CPU_0 avgCPU" | 
 makemv s1 | mvexpand s1| 
 eval yval=case(s1=="CPU_0",0_CPU,s1=="avgCPU",avg_CPU) | 
 eval series=Serveur+":"+s1 | xyseries _time series yval
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;both not working in my splunk&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 12:39:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130777#M35642</guid>
      <dc:creator>echozero39</dc:creator>
      <dc:date>2015-05-29T12:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130778#M35643</link>
      <description>&lt;P&gt;either &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="" sourcetype="" | 
  stats count(eval(CPU="0")) as 0_CPU avg(CPU) as avg_CPU by _time Serveur | 
  eval s1="CPU_0 avgCPU" | 
  makemv s1 | mvexpand s1| 
  eval yval=case(s1=="CPU_0",0_CPU,s1=="avgCPU",avg_CPU) | 
  eval series=Serveur+":"+s1 | xyseries _time series yval
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="" sourcetype="" | 
  stats count(CPU=0) as 0_CPU avg(CPU) as avg_CPU by _time Serveur | 
  eval s1="CPU_0 avgCPU" | 
  makemv s1 | mvexpand s1| 
  eval yval=case(s1=="CPU_0",0_CPU,s1=="avgCPU",avg_CPU) | 
  eval series=Serveur+":"+s1 | xyseries _time series yval
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;both having error : Error in 'eval' command: The expression is malformed. Expected ). &lt;/P&gt;

&lt;P&gt;Maybe it's a version issue ? I am using 6.2.2, the search manual is 6.3.2&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 12:42:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130778#M35643</guid>
      <dc:creator>echozero39</dc:creator>
      <dc:date>2015-05-29T12:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130779#M35644</link>
      <description>&lt;P&gt;I still see double quotes missing. I ran the following on 6.2.2 and didn`t get any error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="" sourcetype="" | 
   stats count(CPU=0) as 0_CPU avg(CPU) as avg_CPU by _time Serveur | 
   eval s1="CPU_0 avgCPU" | 
   makemv s1 | mvexpand s1| 
   eval yval=case(s1=="CPU_0","0_CPU",s1=="avgCPU","avg_CPU") | 
   eval series=Serveur+":"+s1 | xyseries _time series yval
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;eval yval=case(s1=="CPU_0",&lt;STRONG&gt;"0_CPU"&lt;/STRONG&gt;,s1=="avgCPU",&lt;STRONG&gt;"avg_CPU"&lt;/STRONG&gt;) | &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130779#M35644</guid>
      <dc:creator>hmozaffari</dc:creator>
      <dc:date>2020-09-28T20:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130780#M35645</link>
      <description>&lt;P&gt;that ran without error, but I didn't get the result I want.&lt;/P&gt;

&lt;P&gt;In fact, I want to be able to ran this :&lt;BR /&gt;
    index=* sourcetype=* | timechart count(CPU=0) avg(CPU) by Serveur&lt;/P&gt;

&lt;P&gt;However, timechart does not support multiple data series, and the exmple of The Search manual shows that I can run a similar search,&lt;/P&gt;

&lt;P&gt;this is the original search from the document : &lt;BR /&gt;
    index=application_servers | stats sum(handledRequests) as hRs,&lt;BR /&gt;
    avg(sessions) as ssns by _time,source | eval s1="handledReqs sessions"&lt;BR /&gt;
    | makemv s1 | mvexpand s1 | eval&lt;BR /&gt;
    yval=case(s1=="handledReqs",hRs,s1=="sessions",ssns) | eval&lt;BR /&gt;
    series=source+":"+s1 | xyseries _time,series,yval&lt;/P&gt;

&lt;P&gt;I changed it but my search didn't work : &lt;BR /&gt;
    index=* sourcetype="*" | &lt;BR /&gt;
       stats count(CPU=0) as 0_CPU avg(CPU) as avg_CPU by _time Serveur | &lt;BR /&gt;
       eval s1="CPU_0 avgCPU" | &lt;BR /&gt;
       makemv s1 | mvexpand s1| &lt;BR /&gt;
       eval yval=case(s1=="CPU_0",0_CPU,s1=="avgCPU",avg_CPU) | &lt;BR /&gt;
       eval series=Serveur+":"+s1 | xyseries _time series yval&lt;/P&gt;

&lt;P&gt;Can you help me find out the reason ? Thank you in advance !&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:06:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130780#M35645</guid>
      <dc:creator>echozero39</dc:creator>
      <dc:date>2020-09-28T20:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130781#M35646</link>
      <description>&lt;P&gt;OK. I think the problem is that &lt;CODE&gt;0_CPU&lt;/CODE&gt;. The name of the field is incorect.. It must not start with a digit. Change the name of that field and use for example &lt;CODE&gt;nulcpu&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="" sourcetype="" | 
  stats count(eval(CPU="0")) as nulcpu avg(CPU) as avg_CPU by _time Serveur | 
  eval s1="CPU_0 avgCPU" | 
  makemv s1 | mvexpand s1| 
  eval yval=case(s1=="CPU_0",nulcpu,s1=="avgCPU",avg_CPU) | 
  eval series=Serveur+":"+s1 | xyseries _time series yval
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm sure it will work now.&lt;BR /&gt;
Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 21:48:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130781#M35646</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-29T21:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130782#M35647</link>
      <description>&lt;P&gt;OK. I think the problem is that &lt;CODE&gt;0_CPU&lt;/CODE&gt;. The name of the field is incorect. It must not start with a digit. Change the name of that field and use for example &lt;CODE&gt;nulcpu&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="" sourcetype="" | 
   stats count(eval(CPU="0")) as nulcpu avg(CPU) as avg_CPU by _time Serveur | 
   eval s1="CPU_0 avgCPU" | 
   makemv s1 | mvexpand s1| 
   eval yval=case(s1=="CPU_0",nulcpu,s1=="avgCPU",avg_CPU) | 
   eval series=Serveur+":"+s1 | xyseries _time series yval
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm sure it will work now.&lt;BR /&gt;
Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 21:52:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130782#M35647</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-29T21:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130783#M35648</link>
      <description>&lt;P&gt;thank you so much, that one works...&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 07:05:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130783#M35648</guid>
      <dc:creator>echozero39</dc:creator>
      <dc:date>2015-06-01T07:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Trying chart of multiple data series wtih tutoriel but error with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130784#M35649</link>
      <description>&lt;P&gt;The answer to accept is the one bellow. I did not received any point&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2015 12:29:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-chart-of-multiple-data-series-wtih-tutoriel-but-error/m-p/130784#M35649</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-06-02T12:29:36Z</dc:date>
    </item>
  </channel>
</rss>

