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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...