Dashboards & Visualizations

SPLUNK DROP_DOWN BOXES DOES NOT CHANGE CORRECTLY

HenryFitzerald
New Member

Hi,Could anyone please assist. Two drop down boxes one->many structure but

first drop down does not change its value it stays the same at default value
when you attempt to change to others. Please look at the UserInterface text
"your base search here | lookup fd_gmm_pla_microservice_map" .
Has to change correctly for a code lookup query.

Code is as "Service Family" -> "Feature Family"
[One -> Many RelationShip]

Service Families (GMM,HWBT,EDH,PWS)
Each has features as:-
GMM->(CCA,CIA,REG)
HWBT->(PLA)
EDH->(MANACCS,STMT,ACTS)
PWS->(ALL)

It defaults to GMM .
GMM
GMM

When you move to second service family "HWBT" after testing first service family
"GMM" and all its options "CCA,CIA,REG"
the service family stays at "GMM" so you end up with "GMM->PLA" instead of "HWBT"->"PLA"
and same for EDH still has value "GMM".
When you look at UI you see "lookup fd_gmm_pla_microservice_map" instead of "lookup fd_hwbt_pla_microservice_map"

Tried a few things I was not sure to change default to All *. and searchWhenChanged="true">

but unable to change the "Service_family" properly to work properly.

Could anyone please advice.Thanks .Code is below

FD TEST -EVENTS Clone
Shows PCF-Container events for FD-APIS.

<input type="time" token="master_time_span">
  <label>Chart time span</label>
  <default>
    <earliest>-24h@h</earliest>
    <latest>now</latest>
  </default>
</input>
<input type="dropdown" token="service_family_tok">
  <label>Choose Service Family:</label>
  <choice value="GMM">GMM</choice>
  <choice value="HWBT">HWBT</choice>
  <choice value="EDH">EDH</choice>
  <choice value="PWS">PWS</choice>
  <default>GMM</default>
  <initialValue>GMM</initialValue>
  <change>
    <condition value="GMM">
      <set token="feature_values">CCA,CIA,REG</set>
      <unset token="form.enter_feature_tok"></unset>
    </condition>
    <condition value="EDH">
      <set token="feature_values">MANACCS,INBOX,STMT,ACTS</set>
      <unset token="form.enter_feature_tok"></unset>
    </condition>

    <condition value="HWBT">
      <set token="feature_values">PLA</set>
      <unset token="form.enter_feature_tok"></unset>
    </condition>
    <condition value="PWS">
      <set token="feature_values">ALL</set>
      <unset token="form.enter_feature_tok"></unset>
    </condition>
  </change>
</input>
<input type="dropdown" token="enter_feature_tok">
  <label>Choose Feature:</label>
  <fieldForLabel>feature</fieldForLabel>
  <fieldForValue>feature</fieldForValue>
  <search>
    <query>|makeresults|eval feature="$feature_values$"|makemv feature delim=","|mvexpand feature</query>
    <earliest>-1s@s</earliest>
    <latest>now</latest>
  </search>
  <change>
    <eval token="l_service_family_tok">lower($service_family_tok$)</eval>
    <eval token="l_enter_feature_tok">lower($value$)</eval>
  </change>
</input>


<panel>
  <title>This html part is just to print the tokens and can be removed</title>
  <html>
    <h2> Here is an example of LOOKUP filename for $service_family_tok$ AND $enter_feature_tok$ </h2>
    <h1> "your base search here" | lookup fd_$l_service_family_tok$_$l_enter_feature_tok$_microservice_map  "your lookup terms"   </h1>
  </html>
</panel>

Tags (1)
0 Karma
1 Solution

renjith_nair
Legend

@HenryFitzerald,

Tried the same XML and it works as expected. These are the sequence of events I performed and got these results.

alt text

---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

0 Karma

renjith_nair
Legend

@HenryFitzerald,

Tried the same XML and it works as expected. These are the sequence of events I performed and got these results.

alt text

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

HenryFitzerald
New Member

Hi Renjith, Thanks for reply , I was having problems at this end the service family was not changing but retained the GMM when for example changed to HWBT but feature changed to PLA and code rejected saying fd_gmm_pla_microservice_map does not exist.
But I added the to the service_family drop down as => and it seemed to work fine afterwards.

0 Karma

HenryFitzerald
New Member

Hi Renjith, Thanks for reply , I was having problems at this end the service family was not changing but retained the GMM when for example changed to HWBT but feature changed to PLA and code rejected saying fd_gmm_pla_microservice_map does not exist.
But I added the to the service_family drop down as => and it seemed to work fine afterwards.

0 Karma

renjith_nair
Legend

It's working in this simple dashboard xml but for your case, there might be some other elements which uses the same token and not getting updated before the actual search runs. By the way what did you add to the service_family dropdown?

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

HenryFitzerald
New Member

Added "searchWhenChanged="true">
Not sure why it did not show on previous post

Was thinking of also adding to feature family to test.

0 Karma

HenryFitzerald
New Member

added to service_family

0 Karma
Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Your Voice Matters! Help Us Shape the New Splunk Lantern Experience

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Building Momentum: Splunk Developer Program at .conf25

At Splunk, developers are at the heart of innovation. That’s why this year at .conf25, we officially launched ...