All Apps and Add-ons

How to write the regex to get first word from my sample data's format in a single multiline event?

d29priyanka
New Member
AAA,NodeName,esbqpas01
AAA,timestampsize,0
AAA,note0, Warning - use the UNIX sort command to order this file before loading into a spreadsheet
AAA,note1, The First Column is simply to get the output sorted in the right order
AAA,note2, The T0001-T9999 column is a snapshot number. To work out the actual time; see the ZZZ section at the end
CPU_ALL,CPU Total esbqpas01,User%,Sys%,Wait%,Idle%,Busy,PhysicalCPUs 
PCPU_ALL,PCPU Total esbqpas01,User  ,Sys  ,Wait  ,Idle  , Entitled Capacity 
SCPU_ALL,SCPU Total esbqpas01,User  ,Sys  ,Wait  ,Idle   
CPU01,CPU 1 esbqpas01,User%,Sys%,Wait%,Idle% 
PCPU01,PCPU 1 esbqpas01,User ,Sys ,Wait ,Idle 
SCPU01,SCPU 1 esbqpas01,User ,Sys ,Wait ,Idle 
MEM,Memory esbqpas01,Real Free %,Virtual free %,Real free(MB),Virtual free(MB),Real total(MB),Virtual total(MB)
MEMNEW,Memory New esbqpas01,Process%,FScache%,System%,Free%,Pinned%,User%
MEMUSE,Memory Use esbqpas01,%numperm,%minperm,%maxperm,minfree,maxfree,%numclient,%maxclient, lruable pages
PAGE,Paging esbqpas01,faults,pgin,pgout,pgsin,pgsout,reclaims,scans,cycles
PROC,Processes esbqpas01,Runnable,Swap-in,pswitch,syscall,read,write,fork,exec,sem,msg,asleep_bufio,asleep_rawio,asleep_diocio
FILE,File I/O esbqpas01,iget,namei,dirblk,readch,writech,ttyrawch,ttycanch,ttyoutch
BBBN,000,NetworkName,MTU,Mbits,Name
NET,Network I/O esbqpas01,en0-read-KB/s,lo0-read-KB/s,en0-write-KB/s,lo0-write-KB/s
NETPACKET,Network Packets esbqpas01,en0-reads/s,lo0-reads/s,en0-writes/s,lo0-writes/s
NETSIZE,Network Size esbqpas01,en0-readsize,lo0-readsize,en0-writesize,lo0-writesize
NETERROR,Network Errors esbqpas01,en0-ierrs,lo0-ierrs,en0-oerrs,lo0-oerrs,en0-collisions,lo0-collisions

Need output into a type field with an output which looks like:
AAA
CPU_ALL
PCPU_ALL
....

0 Karma

rsennett_splunk
Splunk Employee
Splunk Employee

This is what you want: https://splunkbase.splunk.com/app/1753/
The NMON Performance Monitor for Unix and Linux Systems will do all that for you, and more.
Without a header (in which case you could use multikv) you are really going to have difficulty getting proper context from the data the way you have it...

With Splunk... the answer is always "YES!". It just might require more regex than you're prepared for!

d29priyanka
New Member

Actually its from that app which I need from.
I need the first strings into a field named type.
Also looking for regex without using multikv so that i could create that field.

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...