All Apps and Add-ons

Embed dynamic URL images based on dynamic conditions

ndsmalle0
Explorer

I am attempting to embed url images from a third party vendor into a splunk view. These url images are dynamic in nature and would be best looked up based on a lookup table after a user has entered conditions here is my coding:

I was hoping maybe something in sideview utils could do this but I have yet to find anything?



<module name="ExtendedFieldSearch" layoutPanel="viewHeader">

<param name="replacementMap">

<param name="arg">

<param name="application">

<param name="value"></param>

</param>

</param>

</param>

<param name="field">Application</param>

<param name="intention">

<param name="name">stringreplace</param>

<param name="arg">

<param name="application">

<param name="fillOnEmpty">True</param>

</param>

</param>

</param>

<module name="SubmitButton">

<param name="allowSoftSubmit">True</param>

<param name="label">Search</param>

<param name="updatePermalink">True</param>

<param name="visible">True</param>

<module name="HiddenSearch" layoutPanel="panel_row1_col1" group="Application Asset Data" autoRun="False">

<param name="search">search Application=foo</param>

This is the area where I need help....

</module>

<module name="HiddenSearch" layoutPanel="panel_row4_col1" group="Application Monitor Information" autoRun="False">

<param name="search">|inputlookup new_relic |search Application=$Application$ |fields + src</param>

<param name="groupLabel">Application Monitor Information</param>

<module name="IFrameInclude" layoutPanel="panel_row4_col1" autoRun="False">

<param name="src">src</param>

<param name="height">250</param>

</module>

</module>

</module>

</module>

</module>

</view>

sideview
SplunkTrust
SplunkTrust

First, if you're still using ExtendedFieldSearch and intentions, then you should take another look at the first couple main documentation pages, as well as the docs and examples for TextField.

I'm assuming that the URL's to your images are either present as fields in your search results for some search you have, or that you can get them there as fields via a lookup.

Either way, once you get to the point where you have search result rows where there's some field in there that represents a working URL to image files - whether it's a URL on a public site, or a URL to an image physically present on the splunk server, there are two broad ways of getting these dynamic images to be visible and browsable in a Sideview Utils dashboard.

1) Check out the Table module, and it's "Embedding" features. the simplest examples involve embedding a single HTML module into all of the cells of a particular column in your table, and you would use that HTML module to render an <img> tag, with the src attribute pointing to your images.

2) Check out the Multiplexer module, and the docs and examples there. Multiplexer is similar to Table-embedding in a way, but without the tabular formatting part. You would basically "multiplex" an HTML module here, and that HTML module again would be rendering an <img> tag for each of your images in the search result set.

Both Table and Multiplexer are pageable, meaning you can put them downstream from a Pager module and the user will get "Page 1 2 3 4 5" links they can use to page through the set of images.

Some ways in which people have used Table and Multiplexer can get really cool and kind of complicated, but using a single HTML module for stuff like this is actually pretty simple. The Multiplexer and Table docs give you lots of examples and you'll understand it quickly.

http://sideviewapps.com/apps/sideview-utils

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 ...