Dashboards & Visualizations

Dynamically change "environments" using textbox

leomedina
Explorer

Hello all,

I am trying to dynamically change from environments (i.e. Dev, QA, Prod, etc.) using the textbox input. Can one create separate ones? I have two different indexed data sources in one dashboard. I tried this but it didn't work...

<input type="multiselect" token="environment" searchWhenChanged="true">
      <label>Select one or more environment(s):</label>
      <search>
       <query>| metadata (index=datapower OR index=tibco) type=environment
            | stats count by environment</query>
       <earliest>-24h@h</earliest>
       <latest>now</latest>
      </search>
      <fieldForLabel>Environment</fieldForLabel>
      <fieldForValue>Environment</fieldForValue>
      <prefix>(</prefix>
      <suffix>)</suffix>
      <valueSuffix>"</valueSuffix>
      <delimiter>OR</delimiter>
     </input>

Thanks for the feedback.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi leomedina,
try something like the "multiple inputs" example from Splunk 6.x Dashboard Examples App:

<input type="multiselect" token="environment" searchWhenChanged="true">
    <label>Select one or more environment(s):</label>
    <search>
        <query>
            | metadata (index=datapower OR index=tibco) type=environment
            | dedup environment
            | sort environment
            | table environment</query>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
    </search>
    <fieldForLabel>environment</fieldForLabel>
    <fieldForValue>environment</fieldForValue>
    <prefix>(</prefix>
    <suffix>)</suffix>
    <valuePrefix>environment="</valuePrefix>
    <valueSuffix>"</valueSuffix>
    <delimiter> OR </delimiter>
</input>

Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...