Getting Data In

host_regex syntax for SMB share?

the_wolverine
Champion

I need a syntax example for host_regex to pull the hostname out of a share like the following:

[monitor://\\norcal_server\c$\Windows\System32\LogFiles]
0 Karma

kristian_kolb
Ultra Champion

Since the messageboard seems to be rather moody today, I'm having trouble writing HTML-specific characters at the moment, like < or >, so here goes.

\[monitor\:\/+\\+(?< HOST >[^\\]+)\\

You'd have to remove the spaces surrounding HOST..

or perhaps, even simpler

\\{2}(?< host >[^\\]+)\\

Hope this helps,

Kristian

0 Karma
Get Updates on the Splunk Community!

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...

Observability protocols to know about

Observability protocols define the specifications or formats for collecting, encoding, transporting, and ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...