Dashboards & Visualizations

Is it possible to do an auto-redirect in Splunk?

jiaqya
Builder

I have a Splunk page with a link on it that will take you to another page.
But users have to click on it to go to that other page (the reason for this is that current page is being shutdown, and the redirect link will take them to the new page; this is for users who have saved the link as favorites).

Now, is it possible to auto-redirect the page to that click without users having to click on it, in say, 'n' number of seconds?

Any options of doing it ?

0 Karma
1 Solution

chrisyounger
SplunkTrust
SplunkTrust

Hi,

One way is to convert the dashboard to a HTML dashboard (click the top right) and then add code like this:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Old Dashboard name here</title>
  <script type="text/javascript">
    //<![CDATA[
      window.location.replace("/en-US/search/my_new_dashboard");
    //]]>
  </script>
</head>
<body>
</body>
</html>

I hope this is helpful

View solution in original post

chrisyounger
SplunkTrust
SplunkTrust

Hi,

One way is to convert the dashboard to a HTML dashboard (click the top right) and then add code like this:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Old Dashboard name here</title>
  <script type="text/javascript">
    //<![CDATA[
      window.location.replace("/en-US/search/my_new_dashboard");
    //]]>
  </script>
</head>
<body>
</body>
</html>

I hope this is helpful

jiaqya
Builder

This is wonderful. Can you also tell me how to setup a timer of 5-10 seconds so users can also read a message that they are being re-directed to another page..

0 Karma

chrisyounger
SplunkTrust
SplunkTrust
<!DOCTYPE html>
 <html lang="en">
 <head>
   <title>Old Dashboard name here</title>
   <script type="text/javascript">
     //<![CDATA[
setTimeout(function(){
       window.location.replace("/en-US/search/my_new_dashboard");
},5000);
     //]]>
   </script>
 </head>
 <body>
 </body>
 </html>

That should do it

0 Karma

jiaqya
Builder

Chris, Works perfect, thank you very much

john.

0 Karma
Get Updates on the Splunk Community!

Splunk Forwarders and Forced Time Based Load Balancing

Splunk customers use universal forwarders to collect and send data to Splunk. A universal forwarder can send ...

NEW! Log Views in Splunk Observability Dashboards Gives Context From a Single Page

Today, Splunk Observability releases log views, a new feature for users to add their logs data from Splunk Log ...

Last Chance to Submit Your Paper For BSides Splunk - Deadline is August 12th!

Hello everyone! Don't wait to submit - The deadline is August 12th! We have truly missed the community so ...