Splunk Search

Top 1 for already selected values using query

Digvijay
Path Finder

Digvijay_0-1626335823022.png

 

Current query :

index=salcus sourcetype= ticket_mgmt_rest source= http:ticket_mgmt_rest |rename "properties.o2-TroubleTicket-ReqId" as REQID | transaction REQID keepevicted=true | search eventcount=2 |table REQID duration |sort -duration

 

Now I want only top 1 record which has maximum duration , so how can I modify above query

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| sort 1 -duration

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| sort 1 -duration

Digvijay
Path Finder

thanks @ITWhisperer   for the quick and perfect reply

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...