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