Dashboards & Visualizations

How to get "host" token to work with HTML Tag Cloud?

nyp_kwyc
Explorer
 <html>
      <h2>Events Trend</h2>
      <div id="tagcloud-search1" class="splunk-manager splunk-searchmanager" 
        data-require="splunkjs/mvc/searchmanager" 
        data-options="{            
                &quot;app&quot;: &quot;androidForensics&quot;,             
                &quot;preview&quot;: true,             
                &quot;search&quot;: &quot;index=androidforensics  host=$$host$$ | eval sourcetype=case(sourcetype=\&quot;gmailMessages\&quot;, \&quot;Gmail message\&quot;,        sourcetype=\&quot;calendar_events\&quot;, \&quot;Calendar_Event\&quot;, sourcetype=\&quot;calls\&quot;,             \&quot;Phone Call\&quot;, sourcetype=\&quot;wa_messages\&quot;, \&quot;WhatsApp Message\&quot;,        sourcetype=\&quot;chrome_history\&quot;, \&quot;Google Chrome History\&quot;,        sourcetype=\&quot;sms\&quot;, \&quot;SMS\&quot;, sourcetype=\&quot;gdrive_docs\&quot;,        \&quot;Google Drive document\&quot;) | stats count by sourcetype&quot;,            &quot;earliest_time&quot;: &quot;&quot;,         &quot;latest_time&quot;: &quot;&quot;      }">
    </div>


<div id="tagcloud" class="splunk-view" data-require="app/androidForensics/tagcloud" data-options="{           &quot;minFontSize&quot;: 12,           
        &quot;maxFontSize&quot;: 45,           
        &quot;managerid&quot;: &quot;tagcloud-search1&quot;,          
        &quot;valueField&quot;: &quot;count&quot;,           
        &quot;labelField&quot;: &quot;sourcetype&quot;     }">
</div>          
</html>

Above is a snippet of my tagcloud code, I am current trying to utilize the tagcloud to show my data
However I cant get the token "host" to work with it. I tried replacing the $ character with %24, but it is still not working.
The host is dynamic.

Tags (4)

MattZerfas
Communicator

I was able to get this working by follow the anwser here talking about putting double $$'s but in the token safe format.

http://answers.splunk.com/answers/109260/splunk6-custom-html-visualization-not-updating-if-form-inpu...

0 Karma

MattZerfas
Communicator

I am also trying to do something similar to this. I am wanting to add a time picker in and have the tag cloud panel use the timeframe from the picker. I am not having any luck. Anyone have any ideas or experience with adding time picker info in html panels?

0 Karma

ramdaspr
Contributor

$$host$$ should work fine..

 data-options='{     
    "app": "androidForensics",  "host"="$$host$$" 
 }'>

nyp_kwyc
Explorer

Thanks for the reply.

I updated my code
replacing $$host$$ dosent work for me
any other suggestion?

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...