<?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: Passing checkbox values to timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Passing-checkbox-values-to-timechart/m-p/163318#M186030</link>
    <description>&lt;P&gt;If i remove the Avg() then its showing error as func() is needed for timechart.&lt;/P&gt;</description>
    <pubDate>Wed, 14 May 2014 10:20:12 GMT</pubDate>
    <dc:creator>vaishnavi07</dc:creator>
    <dc:date>2014-05-14T10:20:12Z</dc:date>
    <item>
      <title>Passing checkbox values to timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-checkbox-values-to-timechart/m-p/163316#M186028</link>
      <description>&lt;P&gt;Hi i am using checkboxes module with sideview. I have to pass the values that i select in checkbox drand display graph for that. If i select  "%_Processor_Time" then i should get graph displaying avg(%_Processor_Time). If i select two option like %_Processor_Time and %_DPC_Time then graph should get displayed for both. &lt;/P&gt;

&lt;P&gt;For now the the query is getting passed like this.&lt;/P&gt;

&lt;P&gt;search index=winserver_perf sourcetype="PerfmonMk:Processor" host="adwas1701" | timechart avg(Avg(%_Processor_Time))&lt;/P&gt;

&lt;P&gt;If i select two option in checkbox then query looks like this.&lt;/P&gt;

&lt;P&gt;index=winserver_perf sourcetype="PerfmonMk:Processor" host="adwas1701" | timechart avg(Avg(%_Processor_Time),Avg(%_DPC_Time))&lt;/P&gt;

&lt;P&gt;There are two avg's getting passed in query. I dunno how to remove that. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;                  &amp;lt;module name="Checkboxes" layoutPanel="panel_row2_col2"&amp;gt;
        &amp;lt;param name="name"&amp;gt;column&amp;lt;/param&amp;gt;
        &amp;lt;param name="valueField"&amp;gt;column&amp;lt;/param&amp;gt;
        &amp;lt;param name="labelField"&amp;gt;label&amp;lt;/param&amp;gt;
        &amp;lt;param name="separator"&amp;gt;,&amp;lt;/param&amp;gt; 
        &amp;lt;param name="template"&amp;gt;Avg($value$)&amp;lt;/param&amp;gt;
        &amp;lt;param name="outerTemplate"&amp;gt;$value$&amp;lt;/param&amp;gt;  


                &amp;lt;module name="Search" layoutPanel="panel_row2_col1" autoRun="False"&amp;gt;
                  &amp;lt;param name="search"&amp;gt; index=winserver_perf sourcetype="PerfmonMk:$sourcetype$" host="$host$"  | timechart avg($column$) &amp;lt;/param&amp;gt;
                  &amp;lt;module name="JobProgressIndicator" /&amp;gt; 
                 &amp;lt;module name="ValueSetter" &amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;OBJECT&gt;&lt;PARAM name="arg.charting.legend.placement" /&gt;right&lt;BR /&gt;
  &lt;PARAM name="arg.charting.chart" /&gt;line&lt;BR /&gt;
  &lt;PARAM name="arg.charting.axisTitleX.text" /&gt;Time&lt;BR /&gt;&lt;BR /&gt;
  &lt;PARAM name="arg.charting.axisTitleY.text" /&gt;$statistic$($column$) &lt;BR /&gt;
  &lt;PARAM name="arg.charting.chartTitle" /&gt;$host$ : $sourcetype$ : $column$&lt;BR /&gt;&lt;BR /&gt;
  &lt;PARAM name="arg.charting.chart.nullValueMode" /&gt;connect&lt;BR /&gt;
                        &lt;MODULE name="JSChart"&gt;&lt;BR /&gt;
                          &lt;PARAM name="height" /&gt;300px&lt;BR /&gt;
                          &lt;PARAM name="width" /&gt;100%&lt;BR /&gt;
                        &lt;/MODULE&gt;&lt;BR /&gt;
                      &lt;BR /&gt;
                    &lt;BR /&gt;
                  &lt;/OBJECT&gt;&lt;/P&gt;

&lt;P&gt;Can anyone please help me in finding out what is the mistake in the above code? Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:36:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-checkbox-values-to-timechart/m-p/163316#M186028</guid>
      <dc:creator>vaishnavi07</dc:creator>
      <dc:date>2020-09-28T16:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Passing checkbox values to timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-checkbox-values-to-timechart/m-p/163317#M186029</link>
      <description>&lt;P&gt;Remove the &lt;CODE&gt;avg()&lt;/CODE&gt; around your &lt;CODE&gt;$column$&lt;/CODE&gt; in the search.&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2014 09:27:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-checkbox-values-to-timechart/m-p/163317#M186029</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-05-14T09:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Passing checkbox values to timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-checkbox-values-to-timechart/m-p/163318#M186030</link>
      <description>&lt;P&gt;If i remove the Avg() then its showing error as func() is needed for timechart.&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2014 10:20:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-checkbox-values-to-timechart/m-p/163318#M186030</guid>
      <dc:creator>vaishnavi07</dc:creator>
      <dc:date>2014-05-14T10:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Passing checkbox values to timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Passing-checkbox-values-to-timechart/m-p/163319#M186031</link>
      <description>&lt;P&gt;As it is now, you have two &lt;CODE&gt;avg()&lt;/CODE&gt; wrapped inside each other. One is here:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | timechart avg($column$) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the other is here:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;param name="template"&amp;gt;Avg($value$)&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Resulting in this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart avg(Avg(%_Processor_Time),Avg(%_DPC_Time))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What you want is this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | timechart $column$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;param name="template"&amp;gt;avg($value$)&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Resulting in this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart avg(%_Processor_Time),avg(%_DPC_Time)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 May 2014 21:59:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Passing-checkbox-values-to-timechart/m-p/163319#M186031</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-05-14T21:59:48Z</dc:date>
    </item>
  </channel>
</rss>

