Splunk Enterprise

how to fix the "Please set up valid data source to select" in dashboard studio?

selvam_sekar
Path Finder

Hi,

I was trying the below token logic to get the results count from two different panels and find the variance between results. However, it gives error message as in snapshot.

Note: Panel A and Panel B i have enabled the set token ( basically tic marked "Use search results or job status as tokens")

Also, please suggest how to draw line not just horizontally but also vertically or custom?

SPL:

| makeresults
| eval variance=$A:result.count$ - $B:result.count$
| table variance

Error:

selvam_sekar_2-1713376874417.png

 

selvam_sekar_1-1713376836799.png

Thanks,

Selvam.

Labels (1)
0 Karma

renjith_nair
Legend

@selvam_sekar 

Are you trying to achieve something similar?

renjith_nair_0-1713451938825.png

Here is a run anywhere example . Number input is only to change the value in the A box for demonstration

 

{
    "visualizations": {
        "viz_mP9NTc6l": {
            "type": "splunk.singlevalue",
            "options": {
                "trendColor": "#171d21",
                "backgroundColor": "#dc4e41"
            },
            "dataSources": {
                "primary": "ds_uCpsCnrn"
            }
        },
        "viz_5qfKAE2H": {
            "type": "splunk.singlevalue",
            "options": {
                "backgroundColor": "#b6c75a"
            },
            "dataSources": {
                "primary": "ds_s5yiPOpw_ds_uCpsCnrn"
            }
        },
        "viz_lwpeyQcS": {
            "type": "splunk.singlevalue",
            "options": {
                "backgroundColor": "#62b3b2"
            },
            "dataSources": {
                "primary": "ds_6iVMrVEi_ds_s5yiPOpw_ds_uCpsCnrn"
            }
        },
        "viz_P6dRCwGc": {
            "type": "abslayout.line"
        },
        "viz_jTW6Jy5J": {
            "type": "abslayout.line"
        }
    },
    "dataSources": {
        "ds_uCpsCnrn": {
            "type": "ds.search",
            "options": {
                "enableSmartSources": true,
                "query": "| makeresults count=$number$\n| stats count"
            },
            "name": "A"
        },
        "ds_s5yiPOpw_ds_uCpsCnrn": {
            "type": "ds.search",
            "options": {
                "enableSmartSources": true,
                "query": "| makeresults count=5\n| stats count"
            },
            "name": "B"
        },
        "ds_6iVMrVEi_ds_s5yiPOpw_ds_uCpsCnrn": {
            "type": "ds.search",
            "options": {
                "enableSmartSources": true,
                "query": "| makeresults\r\n| eval variance=$A:result.count$ - $B:result.count$\r\n| table variance"
            },
            "name": "Variant"
        }
    },
    "defaults": {
        "dataSources": {
            "ds.search": {
                "options": {
                    "queryParameters": {
                        "latest": "$global_time.latest$",
                        "earliest": "$global_time.earliest$"
                    }
                }
            }
        }
    },
    "inputs": {
        "input_global_trp": {
            "type": "input.timerange",
            "options": {
                "token": "global_time",
                "defaultValue": "-24h@h,now"
            },
            "title": "Global Time Range"
        },
        "input_vWVKiJlJ": {
            "options": {
                "defaultValue": 10,
                "token": "number"
            },
            "title": "Number Input Title",
            "type": "input.number"
        }
    },
    "layout": {
        "type": "absolute",
        "options": {
            "width": 1440,
            "height": 960,
            "display": "auto"
        },
        "structure": [
            {
                "item": "viz_mP9NTc6l",
                "type": "block",
                "position": {
                    "x": 410,
                    "y": 170,
                    "w": 150,
                    "h": 100
                }
            },
            {
                "item": "viz_5qfKAE2H",
                "type": "block",
                "position": {
                    "x": 680,
                    "y": 170,
                    "w": 150,
                    "h": 100
                }
            },
            {
                "item": "viz_lwpeyQcS",
                "type": "block",
                "position": {
                    "x": 520,
                    "y": 370,
                    "w": 150,
                    "h": 100
                }
            },
            {
                "item": "viz_P6dRCwGc",
                "type": "line",
                "position": {
                    "from": {
                        "x": 483,
                        "y": 274
                    },
                    "to": {
                        "item": "viz_lwpeyQcS",
                        "port": "n"
                    }
                }
            },
            {
                "item": "viz_jTW6Jy5J",
                "type": "line",
                "position": {
                    "from": {
                        "x": 756,
                        "y": 272
                    },
                    "to": {
                        "item": "viz_lwpeyQcS",
                        "port": "n"
                    }
                }
            }
        ],
        "globalInputs": [
            "input_global_trp",
            "input_vWVKiJlJ"
        ]
    },
    "description": "",
    "title": "Variance_Test"
}

 

 

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...