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!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...