Dashboards & Visualizations

Need Guidance on Formatting SPL Output for Individual Machine Values

sanjai
Communicator

Hello everyone,

I'm currently working on a Dashboard to visualize Database latency across various machines, and I'm encountering an issue with the Line Chart's SPL (Search Processing Language). The SPL requirement is to retrieve all values of the field ms_per_block grouped by ds_file_path and machine.


Here's my SPL:

index=development sourcetype=custom_function user_action=database_test ds_file=*
| eval ds_file_path=ds_path."\\".ds_file
| search ds_file_path="\\\\swmfs\\orca_db_january_2024\\type\\rwo.ds"
| chart values(ms_per_block) by ds_file_path machine


My result:

sanjai_1-1715242504369.png

My goal is to have the output where each ds_file_path value is listed in individual rows along with the corresponding machine and ms_per_block values in separate rows. I've tried using the table command:

| table ds_file_path, machine, ms_per_block

sanjai_2-1715248060530.png

But this doesn't give me the desired output. The machine name is under a field, whereas I need the machine name to be a separate field, each containing its respective ms_per_block value.

I feel like I'm missing something here. Any guidance on how to achieve this would be greatly appreciated. Thanks in advance!


 

Labels (2)
0 Karma

deepakc
Builder

Have a look ta the transpose command, see the examples, this may work for you. 

 

https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Transpose  

0 Karma

sanjai
Communicator

Thanks for the reply @deepakc  , but that didn't work for me🙂

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!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...