Splunk Search

How to search over multiple lines

ahmet_goekduman
New Member

Hello together,

I want to search for "Binding Type: 0" in the following example log:

LogName=Directory Service
SourceName=Microsoft-Windows-ActiveDirectory_DomainService
EventCode=2889
EventType=4
Type=Information
ComputerName=XXXXX
User=NOT_TRANSLATED
Sid=S-1-5-7
SidType=0
TaskCategory=LDAP Interface
OpCode=The operation completed successfully.
RecordNumber=7362133
Keywords=Classic
Message=The following client performed a SASL (Negotiate/Kerberos/NTLM/Digest) LDAP bind without requesting signing (integrity verification), or performed a simple bind over a clear text (non-SSL/TLS-encrypted) LDAP connection.
Client IP address:
1.1.11.1:5555
Identity the client attempted to authenticate as:
XXX\XXXX
Binding Type:
0

The problem is that the value 0 is a new line.
Do you know how can I search for this?

Please help.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi
you can use the regex command, something like this:

your_search
| regex "(?ms)Binding\s+Type:\s+0"
| ...

You can test the regex at https://regex101.com/r/B7f8Yz/1 .

Bye.
Giuseppe

Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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