<?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: On one dashboard, how to create one multiselect to create two variables with different values of delimiter and prefix? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325073#M20991</link>
    <description>&lt;P&gt;Отлично &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2018 15:21:25 GMT</pubDate>
    <dc:creator>nryabykh</dc:creator>
    <dc:date>2018-02-28T15:21:25Z</dc:date>
    <item>
      <title>On one dashboard, how to create one multiselect to create two variables with different values of delimiter and prefix?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325064#M20982</link>
      <description>&lt;P&gt;On the dashboard, I use 2 multiselect with the same values, but with different parameters delimiter and prefix. Is it possible to use one multiselect to create two variables with different values of delimiter and prefix. If so, how?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 10:45:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325064#M20982</guid>
      <dc:creator>yav2810</dc:creator>
      <dc:date>2018-02-28T10:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: On one dashboard, how to create one multiselect to create two variables with different values of delimiter and prefix?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325065#M20983</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;
You can try the following workaround:&lt;BR /&gt;
(sorry for image, but I have some problems with correct insertion a block of XML here)&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4486i8E26F35C17B46311/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The point is to eval new token in &lt;CODE&gt;change&lt;/CODE&gt; block of multiselect input:&lt;BR /&gt;
&lt;CODE&gt;&amp;lt;eval token="token_ms2"&amp;gt;replace(replace($token_ms$, "prf1", "prf2"), "delim1", "delim2")&amp;lt;/eval&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;
where &lt;CODE&gt;prf1&lt;/CODE&gt; is the prefix in multiselect and  &lt;CODE&gt;delim&lt;/CODE&gt; is the delimiter.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 11:15:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325065#M20983</guid>
      <dc:creator>nryabykh</dc:creator>
      <dc:date>2018-02-28T11:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: On one dashboard, how to create one multiselect to create two variables with different values of delimiter and prefix?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325066#M20984</link>
      <description>&lt;P&gt;Thank you!!!&lt;BR /&gt;
It is work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 12:41:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325066#M20984</guid>
      <dc:creator>yav2810</dc:creator>
      <dc:date>2018-02-28T12:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: On one dashboard, how to create one multiselect to create two variables with different values of delimiter and prefix?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325067#M20985</link>
      <description>&lt;P&gt;Prompt, and whether it is possible such method is applicable for the decision of other problems: in request the value of a variable is calculated. It is necessary, depending on its value, to expose the rangeValues in the SingleValue dashboard&lt;BR /&gt;
option name="rangeValues"&amp;gt;&lt;STRONG&gt;&lt;EM&gt;[25,50,125,200]&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;title&amp;gt;titleс&amp;lt;/title&amp;gt;
  &amp;lt;single&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;query&amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;-30d@d&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;refresh&amp;gt;5m&amp;lt;/refresh&amp;gt;
      &amp;lt;refreshType&amp;gt;delay&amp;lt;/refreshType&amp;gt;
    &amp;lt;/search&amp;gt;
    &amp;lt;option name="colorBy"&amp;gt;value&amp;lt;/option&amp;gt;
    &amp;lt;option name="colorMode"&amp;gt;block&amp;lt;/option&amp;gt;
    &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="numberPrecision"&amp;gt;0&amp;lt;/option&amp;gt;
    &amp;lt;option name="rangeColors"&amp;gt;["0x6db7c6","0xf7bc38","0x65a637","0xf58f39","0xd93f3c"]&amp;lt;/option&amp;gt;
    &amp;lt;option name="rangeValues"&amp;gt;[25,50,125,200]&amp;lt;/option&amp;gt;
    &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
    &amp;lt;option name="showSparkline"&amp;gt;1&amp;lt;/option&amp;gt;
    &amp;lt;option name="showTrendIndicator"&amp;gt;1&amp;lt;/option&amp;gt;
    &amp;lt;option name="trellis.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
    &amp;lt;option name="trellis.scales.shared"&amp;gt;1&amp;lt;/option&amp;gt;
    &amp;lt;option name="trellis.size"&amp;gt;medium&amp;lt;/option&amp;gt;
    &amp;lt;option name="trendColorInterpretation"&amp;gt;standard&amp;lt;/option&amp;gt;
    &amp;lt;option name="trendDisplayMode"&amp;gt;absolute&amp;lt;/option&amp;gt;
    &amp;lt;option name="unit"&amp;gt;%&amp;lt;/option&amp;gt;
    &amp;lt;option name="unitPosition"&amp;gt;after&amp;lt;/option&amp;gt;
    &amp;lt;option name="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
    &amp;lt;option name="useThousandSeparators"&amp;gt;1&amp;lt;/option&amp;gt;
  &amp;lt;/single&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:09:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325067#M20985</guid>
      <dc:creator>yav2810</dc:creator>
      <dc:date>2018-02-28T13:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: On one dashboard, how to create one multiselect to create two variables with different values of delimiter and prefix?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325068#M20986</link>
      <description>&lt;P&gt;If I understood correctly, this might help. Append &lt;CODE&gt;| eval rangeval="[25,50,125,200]"&lt;/CODE&gt; at the end of your query (of course, you can define this field as you need, based on other fields in search results). Then add &lt;CODE&gt;done&lt;/CODE&gt; section into the &lt;CODE&gt;search&lt;/CODE&gt; block:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
search&lt;BR /&gt;
  query &lt;BR /&gt;
  ...&lt;BR /&gt;
  query&lt;BR /&gt;
   $result.rangeval$&lt;BR /&gt;
search&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;
And then modify option: &lt;CODE&gt;option name="rangeValues"&amp;gt;$tkn$&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Pay attention that if you edit single value via UI, changes in options made in XML source will be overwritten.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:37:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325068#M20986</guid>
      <dc:creator>nryabykh</dc:creator>
      <dc:date>2018-02-28T13:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: On one dashboard, how to create one multiselect to create two variables with different values of delimiter and prefix?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325069#M20987</link>
      <description>&lt;P&gt;Sorry, still problems with XML insertion here &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
&lt;CODE&gt;&amp;lt;done&amp;gt; &amp;lt;set token="tkn"&amp;gt;$result.rangeval$&amp;lt;/set&amp;gt;&amp;lt;/done&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:40:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325069#M20987</guid>
      <dc:creator>nryabykh</dc:creator>
      <dc:date>2018-02-28T13:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: On one dashboard, how to create one multiselect to create two variables with different values of delimiter and prefix?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325070#M20988</link>
      <description>&lt;P&gt;Николай, добрый день!&lt;BR /&gt;
Можно немного пояснить куда какой блок следует включить?&lt;BR /&gt;
| eval rangeval="[25,50,125,200]" - в сам запрос? в query?&lt;BR /&gt;
$result.rangeval$ - данную команду нужно вставить после query?&lt;BR /&gt;
 $result.rangeval$ - в каком месте стоит указать это определение?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 13:50:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325070#M20988</guid>
      <dc:creator>yav2810</dc:creator>
      <dc:date>2018-02-28T13:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: On one dashboard, how to create one multiselect to create two variables with different values of delimiter and prefix?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325071#M20989</link>
      <description>&lt;P&gt;Добрый день &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Да, eval можно включить в конец самого запроса (query). Это, по идее, не должно никак сказаться на отображении самого single value, т.к. это поле допишется справа в таблицу, а single value возьмет первое значащее поле слева. Eval я написал для примера, это поле можно, разумеется, формировать как угодно в пределах SPL &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Далее, в XML внутрь блока &lt;CODE&gt;search&lt;/CODE&gt; (там, где уже есть query, earliest, latest, sampleRation, refresh) надо добавить блок &lt;CODE&gt;done&lt;/CODE&gt; - в нем указываются инструкции, которые надо будет выполнить по завершении запроса. Вот тут есть примеры: &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.2/Viz/tokens#Search_event_elements_and_job_properties"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.2/Viz/tokens#Search_event_elements_and_job_properties&lt;/A&gt;&lt;BR /&gt;
В &lt;CODE&gt;done&lt;/CODE&gt; надо выставить новый токен, в него прописать значение поля rangeval:&lt;BR /&gt;
&lt;CODE&gt;&amp;lt;set token="tkn"&amp;gt;$result.rangeval$&amp;lt;/set&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;А дальше в значении опции rangeValues надо указать $tkn$. Тогда rangeValues будет формироваться динамически в зависимости от значения этого токена, который мы вставили в done.&lt;/P&gt;

&lt;P&gt;К сожалению, я замечал, что использование токенов в options чартов/таблиц/singleValue иногда глючит. Но я попробовал реализовать все вышеописанное - кажется, заработало.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 14:10:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325071#M20989</guid>
      <dc:creator>nryabykh</dc:creator>
      <dc:date>2018-02-28T14:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: On one dashboard, how to create one multiselect to create two variables with different values of delimiter and prefix?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325072#M20990</link>
      <description>&lt;P&gt;все получилось! Большое спасибо!!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 14:12:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325072#M20990</guid>
      <dc:creator>yav2810</dc:creator>
      <dc:date>2018-02-28T14:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: On one dashboard, how to create one multiselect to create two variables with different values of delimiter and prefix?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325073#M20991</link>
      <description>&lt;P&gt;Отлично &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 15:21:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/On-one-dashboard-how-to-create-one-multiselect-to-create-two/m-p/325073#M20991</guid>
      <dc:creator>nryabykh</dc:creator>
      <dc:date>2018-02-28T15:21:25Z</dc:date>
    </item>
  </channel>
</rss>

