<?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: Help with multiselect dashboard input needed in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/524647#M147977</link>
    <description>&lt;P&gt;why are you creating new fields(f1,f2,f3...) for same field(kpi) and values(dt1|dt2|dt3|dt4|total)?&lt;/P&gt;&lt;P&gt;confirm if you are trying to find out average of dt1 or dt2 (what ever you chose from multiselect)&amp;nbsp; and that's available in your index data?&lt;/P&gt;</description>
    <pubDate>Wed, 14 Oct 2020 14:15:26 GMT</pubDate>
    <dc:creator>thambisetty</dc:creator>
    <dc:date>2020-10-14T14:15:26Z</dc:date>
    <item>
      <title>Help with multiselect dashboard input needed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/524641#M147974</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In my dashboard I have defined a multiselect field with the following possible values:&lt;/P&gt;&lt;P&gt;dt1, dt2, dt3 and total&lt;/P&gt;&lt;P&gt;Now, I would like to use them in my search in the aggregation functions (avg) passing them with the kpi token. However I have an issue with the aggregation function themself as they are not able to pick up the VALUES of the newly created fields f1, .., fn.&lt;/P&gt;&lt;P&gt;I was thinking of sth like below in my search:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;index=mlbso sourcetype=webdispatcher 
| eval kpi = "dt3 total dt1 dt2 dt4"
| rex field=kpi "(?P&amp;lt;f1&amp;gt;dt1|dt2|dt3|dt4|total) (?P&amp;lt;f2&amp;gt;dt1|dt2|dt3|dt4|total) (?P&amp;lt;f3&amp;gt;dt1|dt2|dt3|dt4|total) (?P&amp;lt;f4&amp;gt;dt1|dt2|dt3|dt4|total) (?P&amp;lt;f5&amp;gt;dt1|dt2|dt3|dt4|total)"
| timechart span=15m 
  avg(f1) as avg_server,
  avg(f2) as avg_total
  by "DBSID"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the avg does not recognize the value of f1 and f2 as an argument.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I do this in the best way?&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Kamil&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 14:06:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/524641#M147974</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2020-10-14T14:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with multiselect dashboard input needed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/524647#M147977</link>
      <description>&lt;P&gt;why are you creating new fields(f1,f2,f3...) for same field(kpi) and values(dt1|dt2|dt3|dt4|total)?&lt;/P&gt;&lt;P&gt;confirm if you are trying to find out average of dt1 or dt2 (what ever you chose from multiselect)&amp;nbsp; and that's available in your index data?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 14:15:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/524647#M147977</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-10-14T14:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help with multiselect dashboard input needed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/524699#M148004</link>
      <description>&lt;P&gt;I confirm.&lt;/P&gt;&lt;P&gt;I want to make a chart with averages over the fields dt1, dt2, dt3, dt4, total. These fields are available in my index. I am creating the f1, f2 ... from the multiselect field token kpi as this is the best that came up to my mind. The kpi token looks like e.g.&amp;nbsp; "dt3 dt1 dt2", so how would I put it into the search in the form I want otherwise?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 18:24:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/524699#M148004</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2020-10-14T18:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with multiselect dashboard input needed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/524739#M148023</link>
      <description>&lt;P&gt;If I understand your requirement correctly, you are looking to control the timechart series that are displayed, based on the columns you specify in your multiselect.&lt;/P&gt;&lt;P&gt;In that case, you can used the fields statement to only include the _time and DBSID field AND also the token value fields before your timechart command. Then in the timechart, you still do all the aggregations you want in, the missing fields will not appear in the output. Note that the token values in this example have the * character.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;conditional column&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="multiselect" token="columns" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Columns&amp;lt;/label&amp;gt;
      &amp;lt;choice value="timeendpos*"&amp;gt;timeendpos&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="timestartpos*"&amp;gt;timestartpos&amp;lt;/choice&amp;gt;
      &amp;lt;delimiter&amp;gt; &amp;lt;/delimiter&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal
| fields _time sourcetype $columns$
| timechart span=1m avg(timeendpos) as timeendpos avg(timestartpos) as timestartpos by sourcetype
          &amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;This example just looks at two field names timeendpos and timestart pos in the _internal index data. The multiselect will set the token to be the field names and then this token value is used in the fields statement.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 22:14:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/524739#M148023</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-10-14T22:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help with multiselect dashboard input needed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/524777#M148032</link>
      <description>&lt;LI-CODE lang="markup"&gt;    &amp;lt;input type="multiselect" token="kpi" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;KPI&amp;lt;/label&amp;gt;
      &amp;lt;choice value="avg(dt1) as avg_dt1"&amp;gt;dt1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="avg(dt2) as avg_dt2"&amp;gt;dt2&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="avg(dt3) as avg_dt3"&amp;gt;dt3&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="avg(total) as avg_total"&amp;gt;total&amp;lt;/choice&amp;gt;
      &amp;lt;delimiter&amp;gt; &amp;lt;/delimiter&amp;gt;
    &amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Then&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;panel&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=mlbso sourcetype=webdispatcher 
| timechart span=15m 
  $kpi$
  by DBSID
          &amp;lt;/query&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 15 Oct 2020 07:07:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/524777#M148032</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-15T07:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with multiselect dashboard input needed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/525031#M148121</link>
      <description>&lt;P&gt;Perfect, this is precisely what I wanted to achieve. Thank you.&lt;/P&gt;&lt;P&gt;I would not think it goes so straightforward, I wanted to overcomplicate it a bit ...&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 09:43:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/525031#M148121</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2020-10-16T09:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with multiselect dashboard input needed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/525265#M148203</link>
      <description>&lt;P&gt;Note that the solution given by&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;is also a good one and shows you how you can use the value part of an input to generate aggregations used by any subsequent stats/timechart command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Oct 2020 22:23:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-multiselect-dashboard-input-needed/m-p/525265#M148203</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-10-18T22:23:06Z</dc:date>
    </item>
  </channel>
</rss>

