Dashboards & Visualizations

Dynamic Hyperlinks between Pre-Production and Production

El_Franco
Explorer

We have a pre-production environment which is totally separate to our production environment. A number of our dashboards utilise hyperlinks back into source systems to view complete records, and part of the urls are different due to IP addresses on the two environemnts. What I would like to do is be able to set a global setting so that we can utilise the same dashboards without having to recode the link when we migrate from pre-produciton to production. I have tried to use a marco but as these are limited to search it did not effect the link target, is there any other way that we can do this without having to put in steps in migration to ammend the URLs?

Thanks,
Steven

Labels (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

You could try using tokens as parts of URLs. If all else fails, you could of course try to write custom JS (if it's a SimpleXML dashboard; won't work for Dashboard Studio dashboards AFAIR) but it's not a pretty solution.

0 Karma

El_Franco
Explorer

I have added the following to a dashboard to try and set the variable when it loads:

<init>
<condition match="$env:instance_type$ == cloud">
    <set token="URL">Chips</set>
</condition>
<condition>
    <set token="URL">Fish</set>
</condition>
</init>

While the $env:instance_type$ works to bring back the details of the environment when I map it directly in an HTML block it does not seem to want to evaluate in the initiate tags... I do not really want to push this into the parameters on the dashboard as this will confuse users and end up with mistakes happening - is there anywhere else I can set this seamlessly as the dashboard loads?

0 Karma

El_Franco
Explorer

Thanks - tokens look promising enough... i can check if it is Cloud and if so set the token to one value, if not as another. 

0 Karma

eriegner
Splunk Employee
Splunk Employee

When I have seen something similar with others, we ended up leveraging cname records within DNS to set aliases - similar to a macro that you would only have to change once at the source. 

Do you think that would be a viable solution within your environment? 

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!

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Splunk Developer Day announcements: AI agents, MCP tools, Forecasting, and Custom ...

Splunk Developer Day was packed with product and platform updates for developers building in the AI ...