Splunk Search

How to exclude last 3 values in the search results.

vkumar6
Explorer

Hi ,

I need exclude the values last 3 three values from the search results. Can someone please help me on this.

index=main source=blr*| stats count by ENGINE

ENGINE count
9.850.1008 2
9.860.1008 2
9.870.1008 3
9.880.1008 4
9.900.1008 5

When i runs query it should exclude the last 3 values and should give the count.

Thanks,
Vijay

Tags (1)
0 Karma
1 Solution

adonio
Ultra Champion

Hello Vijay,
you can use the sort command.
example: index="_internal" | stats count by sourcetype | sort 3 -count
try on your search.
more on the command here:
http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/sort

hope it helps

View solution in original post

0 Karma

adonio
Ultra Champion

Hello Vijay,
you can use the sort command.
example: index="_internal" | stats count by sourcetype | sort 3 -count
try on your search.
more on the command here:
http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/sort

hope it helps

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 ...