Splunk Search

Transpose and Group By?

SudeepDell
New Member

I am currently trying to format the amount of memory used by each node during a given time in a way that I could create an area graph from the results. Right now I have these three columns:

index=main sourcetype=source
| table _time memory node_name

But I want the columns to be _time, node_name1, node_name2, ...
and the rows to contain the time and the related memory usage that goes along with the node_name.

How can I group the rows by time and separate the memory data for each of the nodes?

Results should look similar to this:

time, node1, node2, node3, ...
6/28, 10000, 20000, 16000, ...
6/29, 15000, 24000, 12500, ...

0 Karma

niketn
Legend

@SudeepDell you can try the following.

 index=main sourcetype=source
 | timechart span=1d  max(memory) as Memory by node_name
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

SudeepDell
New Member

that worked, thanks!

0 Karma

niketn
Legend

@SudeepDell, please accept the answer to mark this question as answered!

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...