Dashboards & Visualizations

How do you exclude empty inputs from a search?

wgpavell
New Member

I created a dashboard with 4 text inputs and added in the end next query:

where like(credentials, "%$credentials$%") OR like(host, "%$host$%") OR like(okato, "%$okato$%") OR where like(command, "%$command$%")

So I need to exclude empty fields from the query. How do I make it? I need it because, if I have at least one empty, the search returns everything. I want to use every part of like, only if, the input for field has value.

0 Karma

andreacorvini
Path Finder

Adjust AND (default) or OR as you needed and try adding to the search field=*, in your case similar to:

credentials=* host=* okato=* command=* | where like(credentials, "%$credentials$%") OR like(host, "%$host$%") OR like(okato, "%$okato$%") OR where like(command, "%$command$%")

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...