Splunk Search

Simple "sort" question

betto86
Engager

Hi, I'm new on Splunk and I need to understand how to do this simple sort:

IP               Value

192.168.0.1        1  
192.168.0.2        5  
192.168.0.2        3  
192.168.0.1        2  
192.168.0.1        4  
192.168.0.2        7  

and I need to obtain this:

IP                         Value

192.168.0.1                  1  
192.168.0.1                  2  
192.168.0.1                  4  
192.168.0.2                  3  
192.168.0.2                  5  
192.168.0.2                  7 

Is there a way to do this withous using multivalue fields? It's like a sort Value with "by" clause.

Thank you!

Tags (1)
0 Karma

gokadroid
Motivator

sort is the correct answer as mentioned by others but since expected output has IPs as well as Values sorted in it hence it actually should be:

yourBaseSearch
| sort by IP, Value

OR without by


yourBaseSearch
| sort IP, Value

Ayn
Legend

Steve_modeler
New Member

works! thx.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Please accept the answer.

---
If this reply helps you, Karma would be appreciated.
0 Karma

BobM
Builder

I think you mean

| sort IP

Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...