Getting Data In

Renaming fields from Perfmon CSV

skark166
New Member

Splunk v6.6.5

I have my Perfmon CSVs from my Domain Controllers imported into Splunk for a dashboard. When the CSV is ingested by Splunk, it associates the column values to the appropriate CSV headers. The headers all contain the hostname in them. It also replaces all the special characters with underscores. This makes combining them a real trick.

CSV Sample 1:

MyDC01_Processor__Total__ Processor TimeMyDC01_Processor__Total__ Idle Time
1288

CSV Sample 2:

MyDC02_Processor__Total__ Processor TimeMyDC02_Processor__Total__ Idle Time
892

I'm trying to create a dashboard that shows avg, max and min (for example). My search as such is the closest I've gotten. But it just gives me the field names as the field values.

index=perfmon sourcetype=dc_perfmon 
   | fields host, "*_Processor__Total__ *"
   | foreach "*_Processor__Total__ *"
       [ 
           eval "<<MATCHSEG2>>" = mvsort(mvappend("<<MATCHSEG2>>","<<FIELD>>")) 
       ]

which provides me with output like so (Processor Time and Idle time are both MV fields):

host:MyDC01
MyDC01_Processor__Total__ Processor Time12
MyDC01_Processor__Total__ Idle Time88
Processor TimeProcessor Time&lt;br/&gt;MyDC02_Processor__Total__ Processor Time
Idle TimeIdle Time&lt;br/&gt;MyDC02_Processor__Total__ Idle Time

hostMyDC02
MyDC02_Processor__Total__ Processor Time12
MyDC02_Processor__Total__ Idle Time88
Processor TimeProcessor Time&lt;br/&gt;MyDC02_Processor__Total__ Processor Time
Idle TimeIdle Time&lt;br/&gt;MyDC02_Processor__Total__ Idle Time

I've tried several variations. I can do it if I separate all of the foreach statements out per field, but that takes so much memory Splunk usually chunks up and dies (My performance CSVs have about 30 fields after all). It only shows my desired field name and the full name of the last unmodified field. I've asked our internal Splunk experts, but they have no solutions. Any advice would be awesome.

Desired outcome would be something like so:

hostMyDC01
MyDC01_Processor__Total__ Processor Time12
MyDC01_Processor__Total__ Idle Time88
Processor Time12
Idle Time88
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Mile High Learning with Splunk University, Denver, Colorado

If Denver is known for its mile-high elevation, Splunk University is about to raise the bar on technical ...

IT Service Intelligence 5.0 Series: Your Guide to the June Launch

We are excited to announce the June release of Splunk IT Service Intelligence (ITSI) 5.0. This update ...

Agent Mode Engaged! Enchaining Agentic Operations with Splunk AI Assistant 2.0

    Are you ready to transform how your team handles complex data requests? We invite you to our upcoming ...