Splunk Search

Merging rows with same values

keishamtcs
Explorer

Hi Guys,

Need help on merging data. i have two columns ( first and second) which has the same value but instead of showing two different lines, i need to show to only one value for these columns while the 3rd and 4th column remains as individual rows. Please let me know how to resolve this.

StorageArray_serialNumber   TotalPorts  LinkStatusType  StorageArray_Port_topology
92213279                      16                   8                 Link Failure
92213279                      16                 8               LinkUp(F_Port Connected)

My desired output.

StorageArray_serialNumber   TotalPorts  StorageArray_Port_topology  LinkStatusType
                                                     Link Failure            8
92213279                      16       -----------------------------------------------------------
                                                    LinkUp(F_Port Connected)       8                
                                        ---------------------------------------------------------------- 
Tags (1)
0 Karma

somesoni2
Revered Legend

Try something like this

your current search with first output | stats list(*) as * by StorageArray_serialNumber, TotalPorts    
0 Karma
Get Updates on the Splunk Community!

Get Operational Insights Quickly with Natural Language on the Splunk Platform

In today’s fast-paced digital world, turning data into actionable insights is essential for success. With ...

Stay Connected: Your Guide to August Tech Talks, Office Hours, and Webinars!

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...

Unleash the Power of Splunk MCP and AI, Meet Us at .Conf 2025, and Find Even More New ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...