Dashboards & Visualizations

How to extract the field from the event

aditsss
Motivator

Hi Team,

I have one requirement.

I need to extract one field from the event. Below are my events.

2020-12-15 01:33:19,049 INFO [ Web Server-54321] o.a.n.w.s.AuthenticationFilter Attempting request for (<akale14><lpdosputb50156.phx.vxp.com><CN=lpdosputb50089.phx.vxp.com................

2020-12-15 01:32:35,854 INFO [Web Server-67688] o.a.n.w.s.AuthenticationFilter Attempting request for (<kkanchi><CN=lpdosputb50090.phx.vxp.com, OU=Middleware Utilities

2020-12-15 01:31:39,772 INFO [ Web Server-53937] o.a.n.w.s.AuthenticationFilter Attempting request for (<pwadh19><lpdosputb50089.phx.vxp.com><CN=lpdosputb50089.phx.vxp.com

I want to extract the word that I have highlighted.

Can someone provide me regex for that.

Than

Labels (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @aditsss,

please, try this:

| rex "\<(?<my_field>\w+)\>\<"

 that you can test at https://regex101.com/r/b3f13a/1/

Ciao.

Giuseppe

Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...