Dashboards & Visualizations

Splunk table and drill down in Dashboard Studio

SplunkerNoob
Loves-to-Learn Lots

I have a Splunk table that has 3 rows and a count for each row. How do I make each value in table go to a different URL.  This is what I have but every row I click goes to that link. I want each table to go to a different link.

    "type": "splunk.table",
    "dataSources": {
        "primary": "ds_5ds4f5"
    },
    "title": "Device Inventory",
    "eventHandlers": [
        {
            "type": "drilldown.customUrl",
            "options": {
                "url": "https://device.com",
                "newTab": true
            }
        }
    ],
Labels (1)
0 Karma

SplunkerNoob
Loves-to-Learn Lots

I think it is working but unfortunately I get:

The URL you clicked cannot open as it is invalid and might contain malicious code. Change the URL to a relative or absolute URL, such as /app/search/datasets or https://www.splunk.com.

0 Karma

KendallW
Contributor

Hi @SplunkerNoob 

Assuming these are external URLs (not other dashboards/searches within Splunk), you can add the trusted domains to the drilldownUrlWhitelist setting in the web.conf file. 


@SplunkerNoob wrote:

I think it is working but unfortunately I get:

The URL you clicked cannot open as it is invalid and might contain malicious code. Change the URL to a relative or absolute URL, such as /app/search/datasets or https://www.splunk.com.


0 Karma

KendallW
Contributor

Hi @SplunkerNoob, first create a field in your search which contains the URLs, e.g. 

...
| eval target_url=case(
    device_type=="type1", "https://device1.com",
    device_type=="type2", "https://device2.com",
    device_type=="type3", "https://device3.com",
    1=1, "https://default.com"
)

 

Then in your dashboard:

<drilldown>
    <link target="_blank">{{row.target_url}}</link>
</drilldown>
0 Karma

KendallW
Contributor

Or with JSON:

{
    "type": "splunk.table",
    "dataSources": {
        "primary": "ds_5ds4f5"
    },
    "title": "Device Inventory",
    "eventHandlers": [
        {
            "type": "drilldown.customUrl",
            "options": {
                "url": "{{row.target_url}}",
                "newTab": true
            }
        }
    ]
}
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!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...