Dashboards & Visualizations

how to set different values for labels, based on single drill down option in splunk studio dashboard?

deruvara
Explorer

I am trying to set up an index page in splunk studio dashboard, which redirects to other splunk dash boards based on dropdown. dropdown has three values, based on value dashboard will be updated with that category dashboards list, where on click it redirects to that category splunk dashboard.

Say for example, in below image 1, type is B-004. Both the boxes are updated with same links given in static input. I was expecting BOX1 being updated with https://B-004/logs and BOX 2 being updated with https://B-004/results as in image 2. please find the code below.

And what would be SPL if want to give a string name(any) instead number for URL display.

Appreciate your help. thanks in advance.

image 1:

deruvara_0-1643668267021.png

image 2:

deruvara_1-1643668642136.png

code  for image 1:

{
    "visualizations": {
        "viz_Hpfgo6KN": {
            "type""viz.rectangle",
            "options": {
                "stroke""transparent",
                "fill""#1A1C20",
                "rx"4
            }
        },
        "viz_lto5aays": {
            "type""viz.text",
            "options": {
                "content""box1",
                "fontSize"14,
                "fontWeight""bold",
                "textColor""#FBFBFB"
            }
        },
        "viz_AJxRjGHA": {
            "type""abslayout.line",
            "options": {
                "strokeColor""#33343B"
            }
        },
        "viz_ZI34ttXn": {
            "type""viz.singlevalue",
            "options": {
                "backgroundColor""#ffffff"
            },
            "dataSources": {
                "primary""ds_pQ72LSdV"
            },
            "eventHandlers": [
                {
                    "type""drilldown.customUrl",
                    "options": {
                        "url""$myWebsiteToken$",
                        "newTab"true
                    }
                }
            ]
        },
        "viz_Nd21m86c": {
            "type""viz.rectangle",
            "options": {
                "stroke""transparent",
                "fill""#1A1C20",
                "rx"4
            }
        },
        "viz_icJmS4Ub": {
            "type""viz.text",
            "options": {
                "content""box2",
                "fontSize"14,
                "fontWeight""bold",
                "textColor""#FBFBFB"
            }
        },
        "viz_mSmorwn2": {
            "type""viz.singlevalue",
            "options": {
                "backgroundColor""#ffffff"
            },
            "dataSources": {
                "primary""ds_gy5Vi8dr_ds_pQ72LSdV"
            },
            "eventHandlers": [
                {
                    "type""drilldown.customUrl",
                    "options": {
                        "url""$myWebsiteToken$",
                        "newTab"true
                    }
                }
            ]
        }
    },
    "dataSources": {
        "ds_pQ72LSdV": {
            "type""ds.search",
            "options": {
                "query""index= _internal\n| stats count",
                "queryParameters": {
                    "earliest""-4h@m",
                    "latest""now"
                }
            },
            "name""Search_1"
        },
        "ds_gy5Vi8dr_ds_pQ72LSdV": {
            "type""ds.search",
            "options": {
                "query""index= _internal\n| stats count",
                "queryParameters": {
                    "earliest""-4h@m",
                    "latest""now"
                }
            },
            "name""Copy of Search_1"
        }
    },
    "inputs": {
        "staticInput": {
            "type""input.dropdown",
            "options": {
                "items": [
                    {
                        "label""A-002",
                        "value""https://A-002/"
                    },
                    {
                        "label""B-004",
                        "value""https://B-004/"
                    },
                    {
                        "label""C-005",
                        "value""https://C-005/"
                    }
                ],
                "token""myWebsiteToken"
            },
            "title""type"
        }
    },
    "layout": {
        "type""absolute",
        "options": {
            "height"1100,
            "showTitleAndDescription"false,
            "backgroundColor""#111215",
            "width"1500,
            "display""auto-scale"
        },
        "globalInputs": [
            "staticInput"
        ],
        "structure": [
            {
                "item""viz_Hpfgo6KN",
                "type""block",
                "position": {
                    "x"0,
                    "y"0,
                    "w"390,
                    "h"360
                }
            },
            {
                "item""viz_lto5aays",
                "type""block",
                "position": {
                    "x"0,
                    "y"0,
                    "w"300,
                    "h"50
                }
            },
            {
                "item""viz_AJxRjGHA",
                "type""line",
                "position": {
                    "from": {
                        "x"1496,
                        "y"212
                    },
                    "to": {
                        "x"-3,
                        "y"212
                    }
                }
            },
            {
                "item""viz_ZI34ttXn",
                "type""block",
                "position": {
                    "x"70,
                    "y"120,
                    "w"250,
                    "h"130
                }
            },
            {
                "item""viz_Nd21m86c",
                "type""block",
                "position": {
                    "x"400,
                    "y"0,
                    "w"390,
                    "h"360
                }
            },
            {
                "item""viz_icJmS4Ub",
                "type""block",
                "position": {
                    "x"430,
                    "y"20,
                    "w"300,
                    "h"50
                }
            },
            {
                "item""viz_mSmorwn2",
                "type""block",
                "position": {
                    "x"500,
                    "y"140,
                    "w"250,
                    "h"130
                }
            }
        ]
    },
    "description""Viz Description Here",
    "title""testing_index"
}
Labels (3)
0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...