Splunk Search

How to create a different chart for each multiselect input

ploehnnico
New Member

Hi, is there a way to create a different chart for each selected input of the multiselect field?
When I select multiple values in the multiselect field, I get only one token, where the values a seperated by a determiter like OR or AND.
So in order to create a different chart for each multiselect value I want to have a different token for each value, so I can display one chart based on each token, or hide it, if the token is not selected.
Is there a way to realize this?

0 Karma

maciep
Champion

could you elaborate on exactly what you want? what type of charts? why a separate one for each value, instead of all values on the same chart?

Maybe a good candidate for a trellis layout?

0 Karma

ploehnnico
New Member

Im trying to visualize the traffic going through an API Gateway which has many different interfaces on it. So every request going to that Gateway is routed by the corresponding interface.
Now I want the multiselect values to be my Interface names, so I can get one different chart for each interface, within the Chart I search my logs for the Interface name so I can display the requests per hour in it.
I dont want to have all Data in one Chart because there are like 50 ore more interfaces, so it will be better to compare Them all when they are in different Charts.
I think it would work if there was a way to generate a different Token for each selected value in my multiselect field...

0 Karma

maciep
Champion

i think the difficult part would be trying to create panels dynamically - don't think it's doable in simple xml but can probably be done with js?

Did you check out the trellis layout though? I think that's probably going to be your best solution. And if you bump up on a limit of how many charts it can display, then I believe there are workarounds.

So your search would use the multi-select token you built to filter your events and would group by interface, but then you choose the trellis layout option for whatever visualization you want to use - and splunk will create a separate graph for each interface in the by clause.

index=your_api_gateway_logs $your_interface_ms_token_logic_here$ | timechart limit=100 useother=f span=1h count by interface
0 Karma

ploehnnico
New Member

Thank you for your help, it worked with the trellis layout like you described.
Although it would be nice to create the tables dynamically but I think youre right and that isnt possible with only simple XML...

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

❄️ Celebrate the season with our December lineup of Community Office Hours, Tech Talks, and Webinars! ...

Splunk and Fraud

Watch Now!Watch an insightful webinar where we delve into the innovative approaches to solving fraud using the ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...