Dashboards & Visualizations

How to reference token namespaces in SimpleXML?

rjthibod
Champion

I recently saw a reference in slides from .conf 2016 (https://conf.splunk.com/files/2016/slides/dashboard-wizardry.pdf, slide 16) that suggests one can reference a specific token namespace in SimpleXML, e.g., $submitted:mytoken$ or $default:mytoken$.

Initial searches for documentation came up empty, and simple tests in 6.4 seem to fail.

Can anyone clarify if this is supported, what versions support it, and if there is some documentation?

1 Solution

rjthibod
Champion

My own testing has determined the following:

  1. There currently is no documentation on the Splunk site and the Splunk Docs team has my feedback.
  2. This is only in Splunk 6.5 and newer
  3. You can reference the namespaces, $default:...$ and $submitted:..., to get token values.
  4. You cannot reference the namespace when setting a token.

View solution in original post

rjthibod
Champion

My own testing has determined the following:

  1. There currently is no documentation on the Splunk site and the Splunk Docs team has my feedback.
  2. This is only in Splunk 6.5 and newer
  3. You can reference the namespaces, $default:...$ and $submitted:..., to get token values.
  4. You cannot reference the namespace when setting a token.

DalJeanis
SplunkTrust
SplunkTrust

Note sure where in the other docs it might be, but here's a couple of references...

Walkthrough of the autogenerated HTML dashboard code:

http://dev.splunk.com/view/SP-CAAAETK#section4

Thread with a couple of good references...

https://answers.splunk.com/answers/143244/how-token-namespaces-and-initialize-tokens-help-with-execu...

0 Karma

rjthibod
Champion

Thank you for digging, but these are not applicable. I am very comfortable with token namepscaes in JS and HTML and their general underpinnings. The question is specifically about referencing tokens by their namespace in SimpleXML, which seems to be a feature with no documentation or clarification in terms of where it can be used.

0 Karma

pradeepkumarg
Influencer

I highly recommend installing Splunk 6.x Dashboard Examples app which has many good examples with sample codes.

https://splunkbase.splunk.com/app/1603/

0 Karma

rjthibod
Champion

I do not see anything in that app or in the documentation that addresses my original question. If you can, please be more specific in regards to what I am missing that addresses my specific question about referencing the token namespaces directly in the SimpleXML token values, e.g., $submittied:mytoken$. Please point it out if I am missing something.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...