Dashboards & Visualizations

Manipulate URL Parameter as Dashboard Token

zchef2k
Observer

Hello Everyone. This is my first post in the forum, please be gentle. 🙂

I've spent an inordinate amount of trying to get this to work, but I have a requirement to take a FQDN passed as a URL parameter to a dashboard and convert it to a short hostname for use a token in search for several panels. I have tried just about every combination of <init>, <eval>, and <set> to no avail to get it populate at page load. I have even tried to attack this in search itself, unsuccessfully, by using something similar to this:

 

index="syslog_main" source="/var/log/messages" | eval short_name=replace(fqdn,"^([^\.]+).+","\1") | where like (host, "%short_name%") ]

 

 

Can someone suggest  a new strategy? At this point I'm probably just making it too complicated.

TIA

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Have you tried rex?

index="syslog_main" source="/var/log/messages" 
| rex field=fqdn "(?<short_name>[^\.]+)"
| where like (host, "%short_name%")
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

What’s New & Next in Splunk SOAR

Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...