Splunk Search

How to format distinguishedName to domain

Meloow
Engager

I am looking to format ldap extracted distinguishedName to a domain.

Example

CN=Username,OU=Folder,OU=Folder,DC=domain,DC=com

Output

domain.com

Labels (2)
0 Karma
1 Solution

isoutamo
SplunkTrust
SplunkTrust

Hi

one way to do it

| makeresults
| eval dn="CN=Username,OU=Folder,OU=Folder,DC=domain,DC=com"
| rex field=dn max_match=0 "(?ms)DC=(?<d1>[\w]+),DC=(?<d2>[\w]+)$"
| eval dn2=d1 .".". d2

r. Ismo 

View solution in original post

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

one way to do it

| makeresults
| eval dn="CN=Username,OU=Folder,OU=Folder,DC=domain,DC=com"
| rex field=dn max_match=0 "(?ms)DC=(?<d1>[\w]+),DC=(?<d2>[\w]+)$"
| eval dn2=d1 .".". d2

r. Ismo 

0 Karma
Get Updates on the Splunk Community!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...