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
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...