Dashboards & Visualizations

splunk dashboard dropdown

mnair001c
New Member
 i am trying to put a drop with the option and when i select an option it should replace model in the query and run

<row>
    <panel>
      <input type="dropdown" token="model" searchWhenChanged="true">
        <label>device Model</label>
        <choice value="">xg1v3</choice>
        <choice value="">xg2v2</choice>
      </input>
      <event>
        <title>By Device Model</title>
        <search>
          <query>earliest=-3h (sourcetype=xreGuide INFO c=c.c.g.DeepLinkManager processing DeepLinkUrl: overlaylauncher partnerId=comcast "overlayName=LINEAR_UPSELL_SUBSCRIPTION_ERROR_OVERLAY") OR (sourcetype=xreGuide INFO c=c.c.d.o.OfferQueries (7562343238554664117) "request body") OR (sourcetype=xreGuide INFO c=c.c.g.p.g.n.NGBPresentationUtils "watchable=true") |rex "(?<rb>request body)" | rex "station\:(?<STATION_ID>[^\"]*)\""| transaction receiverId startsWith="request body" endsWith="LINEAR_UPSELL_SUBSCRIPTION_ERROR_OVERLAY" maxspan=3s
| `get-info`
| `get-deviceinfo`
| rex "station\:(?<STATION_ID>[^\"]*)\""
|rex "acct\:(?<XBO_Account>[^\"]*)\""
| where model="$model$"
| stats count by XBO_Account receiverId STATION_ID MARKET_NAME model</query>
          <earliest>0</earliest>
          <latest></latest>
        </search>
      </event>
    </panel>
  </row>
Tags (1)
0 Karma

niketn
Legend

@mnair001c, seems like you do not have value set for the dropdown labels. Can you change the choice code as below?

     <choice value="xg1v3">xg1v3</choice>
     <choice value="xg2v2">xg2v2</choice>

Also, instead of adding | where model="$model$", similar filter should be applied in the base search itself, i.e.

     <query>model="$model$"  ...
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
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!

Continue Your Federation Journey: Join Session 3 of the Bootcamp Series

To help practitioners build a stronger foundation, we launched the Data Management & Federation ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Casting Call: Compete in Cyber Games

Lights, Camera, SecOps: Apply to Compete in Cyber Games     Think you have what it takes to beat the clock? ...