Dashboards & Visualizations

Dynamic dropdown for a dashboard issue: "Error in 'search' command: Unable to parse the search

Communicator

Hi, I'm trying my first attempt at building a dynamic dropdown for a dashboard, and I'm having an issue with the input.

I've set up the dynamic inputs appropriately, as I see the dropdown menu correctly on the dashboard overall. All the possible dropdown options are the exact values I want.

However, when I try to populate the dashboard with the appropriate panel, it gives me the error "Error in 'search' command: Unable to parse the search: Comparator '=' is missing a term on the right hand side.

My search looks as follows: index=<> sourcetype=<> pageURL!="" pageURL=<"URL"> | stats count by source

Doing this search populates the results in the manner I want it to, assuming the URL I put into pageURL is accurate. However, when I replace pageURL with the field '$Page_URL$', which is the name of the dynamic input, it throws that error.

If I instead use pageURL="$Page_URL$" the comparator error is not thrown, but the dashboard panel fails to update to any value and is blank.

0 Karma
1 Solution

SplunkTrust
SplunkTrust

How are you passing the input
Through filters?

Then you need to depend your token on that token
You this link to depend on input filter
https://docs.splunk.com/Documentation/Splunk/6.6.3/Viz/tokens
Also refer

https://answers.splunk.com/answers/188709/how-to-display-dashboard-panels-dynamically.html

View solution in original post

SplunkTrust
SplunkTrust

How are you passing the input
Through filters?

Then you need to depend your token on that token
You this link to depend on input filter
https://docs.splunk.com/Documentation/Splunk/6.6.3/Viz/tokens
Also refer

https://answers.splunk.com/answers/188709/how-to-display-dashboard-panels-dynamically.html

View solution in original post

Communicator

I was just passing a simple filter. I created a filter by first creating a new dashboard, and then selecting new input(dropdown). I went through that and created a search query for a table of values that I want to populate the filter with. It seems to be working as intended, as the dropdown filter has all the appropriate selections.

I then clicked on new panel, and tried to write the query I posted above using the token name.

The documentation you referred me to has helped, however...thanks for linking that. Its working(ish) now in that I can populate results. Thanks!

SplunkTrust
SplunkTrust

Let me know if it works!

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!