Splunk Search

Why am I having a problem in tokens when using customviz app from splunkbase?

patricianaguit
Explorer

Hi, I tried to use bubble chart from custom viz app that i downloaded on splunk base. The code works if i specify the values in search area inside the "data-options". However, every time i include token using "$$" like what ive read in other questions, the code will not work all of sudden. Can someone help me out?

Below is my code

  <form script="autodiscover.js">
      <label>BubbleChart_Trial1_customvizapp</label>
        <fieldset submitButton="false">
        <input type="time" token="time_token">
          <label>Time</label>
          <default>
            <earliest>0</earliest>
            <latest></latest>
          </default>
        </input>
        <input type="multiselect" token="status_token" searchWhenChanged="true">
          <label>Status</label>
          <choice value="*">All</choice>
          <prefix>(</prefix>
          <suffix>)</suffix>
          <valuePrefix>Status="</valuePrefix>
          <valueSuffix>"</valueSuffix>
          <delimiter> OR </delimiter>
          <fieldForLabel>Status</fieldForLabel>
          <fieldForValue>Status</fieldForValue>
          <search>
            <query>sourcetype=management_sampledata_csv 
    | stats count by "Status"</query>
            <earliest>0</earliest>
            <latest></latest>
          </search>
        </input>
        <input type="multiselect" token="ticket_token" searchWhenChanged="true">
          <label>Ticket Type</label>
          <choice value="*">All</choice>
          <prefix>(</prefix>
          <suffix>)</suffix>
          <valuePrefix>"Ticket Type"="</valuePrefix>
          <valueSuffix>"</valueSuffix>
          <delimiter> OR </delimiter>
          <fieldForLabel>TicketType</fieldForLabel>
          <fieldForValue>TicketType</fieldForValue>
          <search>
            <query>sourcetype=management_sampledata_csv 
     $status_token$  | rename "Ticket Type" as TicketType
    | stats count by "TicketType"</query>
            <earliest>0</earliest>
            <latest></latest>
          </search>
        </input>
        <input type="multiselect" token="priority_token" searchWhenChanged="true">
          <label>Priority</label>
          <choice value="*">All</choice>
          <prefix>(</prefix>
          <suffix>)</suffix>
          <valuePrefix>Priority="</valuePrefix>
          <valueSuffix>"</valueSuffix>
          <delimiter> OR </delimiter>
          <fieldForLabel>Priority</fieldForLabel>
          <fieldForValue>Priority</fieldForValue>
          <search>
            <query>sourcetype=management_sampledata_csv  $status_token$ $ticket_token$
    | stats count by "Priority"</query>
            <earliest>0</earliest>
            <latest></latest>
          </search>
        </input>
      </fieldset>
      <row>
        <panel>
          <html>
               <h2>Time Spent per Category(Per User)</h2>
                 <div id="bubbleSearch1" class="splunk-manager" data-require="splunkjs/mvc/searchmanager" data-options="{ "search": "sourcetype=management_sampledata_csv  $$status_token$$ $$ticket_token$$ $$priority_token$$  | stats count(\"Ticket Type\") as CountTicketType by \"Ticket Type\"| eventstats sum(CountTicketType) as Total| eval TicketTypeTotal=(round((CountTicketType/Total)*100,2))",                      "preview": true     }">
                 </div>    
             <div id="bubbleChart1" class="splunk-view" data-require="app/search/components/bubblechart/bubblechart" data-options="{                      &quot;managerid&quot;: &quot;bubbleSearch1&quot;,                      &quot;nameField&quot;: &quot;Ticket Type&quot;,                      &quot;categoryField&quot;: &quot;Total&quot;,                      &quot;valueField&quot;: &quot;TicketTypeTotal&quot;,                      &quot;height&quot;: 450                   }">
                 </div>
             </html>
        </panel>
      </row>
    </form>
Tags (3)
0 Karma

niketn
Legend

@patricianaguit which version of Splunk are you using. Is there any reason why you are not using built in Bubble Chart visualization which is available in Splunk from version 6.4 onward?

On second note, I am not sure Bubble Chart is supposed to be used the way you are trying as there should be JavaScript code rendering the visualization. But I might be wrong.

Do check out Splunk Dashboard Examples App which should have the Example for Bubble Chart as well.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...