Splunk Search

Rex Command Not Working

NightShark
Path Finder

Hello,

The rex command to catch and group the Accesses multi values are not working even though the results in regex101 are fine. Could you guys tell me what I am missing?

Test Log:

 

12/12/2012 04:25:13 PM
LogName=Security
EventCode=5145
EventType=0
ComputerName=test.corp
SourceName=Microsoft Windows security auditing.
Type=Information
RecordNumber=2049592111
Keywords=Audit Success
TaskCategory=Detailed File Share
OpCode=Info
Message=A network share object was checked to see whether client can be granted desired access.
	
Subject:
	Security ID:		User\Test
	Account Name:		Test
	Account Domain:		Test
	Logon ID:		0x117974CE

Network Information:	
	Object Type:		File
	Source Address:		::1
	Source Port:		51234
	
Share Information:
	Share Name:		\\*\C$
	Share Path:		\??\C:\
	Relative Target Name:	Users\Test\Desktop

Access Request Information:
	Access Mask:		0x100081
	Accesses:		SYNCHRONIZE
				ReadData (or ListDirectory)
				ReadAttributes
				
Access Check Results:
	-

 

 

Splunk Rex Query:

 

...
| rex field=Body ".*Access Mask.*\sAccesses:\s(?<Accesses2>.+?)Access\sCheck Results\:.*"

 

 

Thanks,

Regards,

0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| rex field=Body "(?ms).*Access Mask.*\sAccesses:\s(?<Accesses2>.+?)Access\sCheck Results\:.*"

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| rex field=Body "(?ms).*Access Mask.*\sAccesses:\s(?<Accesses2>.+?)Access\sCheck Results\:.*"

NightShark
Path Finder

Thank you very much, working perfect as intended

0 Karma
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...