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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...