Splunk Search

What rex command can separate hostname from the field?

priya1926
Path Finder

NONPROD:abcd123456_DBSERVER

Need to extract abcd123456 from the string...

Labels (4)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Without the full context of the string or knowing which parts are fixed, I have guessed you want anything between the colon and the underscore:

| rex ":(?<hostname>[^_]+)_"

 

Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

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