Dashboards & Visualizations

Pretty Print XML - How to create an HTML section in Simple XML, and use the $variables$ to access the data?

_gkollias
SplunkTrust
SplunkTrust

I have a custom Splunk command that goes out and fetches XML content and I want to prettyprint the content results in our Splunk dashboard.

Back in the advanced XML days, you could use an HTML pre tag to display the results, but I haven't found a working way to do this in Simple XML.

Is there a way to create an HTML section in Simple XML, and use the $variables$ to access the data?

Any insight is greatly appreciated!

0 Karma

jimmip
New Member
0 Karma

sloshburch
Splunk Employee
Splunk Employee

Yea - although I'm not 100% that I'm understanding the question.

I only have a few moments so I can't fetch the associated links, but essentially you'll want to run a search and use the "set" (might be easier to look for "unset" in our docs). That's how you can assign items to variables to use elsewhere in your page.

There's even some new attributes that expose some job specific details that you can set and use in your other panels.

Once I get more time, I can elaborate with links but let me know thoughts on that in case I'm completely off point.

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...