Dashboards & Visualizations

Could create search message in multiselect filter

gemrose
Explorer

I am getting error "could not create search". How to fix this error ?

gemrose_0-1727695353081.png

xml::

<input type="multiselect" token="environment">
<label>Environments</label>
<choice value="cfp08">p08</choice>
<choice value="cfp07">p07</choice>
<choice value="*">ALL</choice>
<default>*</default>
<valuePrefix>environment =</valuePrefix>
<delimiter> OR </delimiter>
<search>
<query/>
</search>
<fieldForLabel>environment</fieldForLabel>
<fieldForValue>environment</fieldForValue>
</input>
Labels (1)
Tags (1)
0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

you haven't add any SPL for query there.

You could check and use Splunk Dashboard example app https://splunkbase.splunk.com/app/1603 for creating your own dashboards.

            <input type="multiselect" token="sourcetype_token" searchWhenChanged="true">
                <default>splunkd, splunk_web_service, splunkd_access</default>
                <!-- The final value will be surrounded by prefix and suffix -->
                <prefix>(</prefix>
                <suffix>)</suffix>
                <!-- Each value will be surrounded by the valuePrefix and valueSuffix -->
                <valuePrefix>sourcetype="</valuePrefix>
                <valueSuffix>"</valueSuffix>
                <!-- All the values and their valuePrefix and valueSuffix will be concatenated together with the delimiter between them -->
                <delimiter> OR </delimiter>
                <choice value="*">ALL</choice>
                <fieldForLabel>sourcetype</fieldForLabel>
                <fieldForValue>sourcetype</fieldForValue>
                <search>
                    <query>index=_internal | stats count by sourcetype</query>
                    <earliest>0</earliest>
                </search>
            </input>

Just add/modify <search><query>....</query></search> part into your form.

r. Ismo

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!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...