Monitoring Splunk

expression for field extraction extraction of table data

ravir_jbp
Explorer

 

 

12/27/21
6:42:50.000 AM	
PSComputerName 		Name                     Memory
-------------- 		----                     ------
Host1     		dfdf_Svc.exe           	16024
Host1    		sssService.exe		13142056
Host1     		abcservice.exe        	31380
Host1     		xyzservice.exe          114340
Host1     		rrrrr.exe       	29304


12/27/21
6:42:50.000 AM	
PSComputerName 		Name                     Memory
-------------- 		----                     ------
Host2     		dfdf_Svc.exe            16064
Host2     		sssService.exe 		13144028
Host2     		abcservice.exe           114708
Host2     		xyzservice.exe       	 32248
Host2    		 rrrrr.exe       	 33616


I have these splunk output event in splunk logs. 1 event is for one specific server only. Under one server we have 5 services running and associated memory information. These output is in table format. I like to create regular expression so that I can create table format output as below:



Servername          Servicename               Memory(in MB) (since above memory in bytes)

 

 

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Why use a regular expression when Splunk has a command specifically for this data format?  Check out the multikv command at https://docs.splunk.com/Documentation/Splunk/8.2.4/SearchReference/Multikv

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...